Repository navigation
feat(validation): add security scheme rules S-041 to S-043 - #523
Merged
Merged
Conversation
The built-in oas3-operation-security-defined cannot be enabled because it requires scopes under flows, which openIdConnect schemes do not have. The r4 ruleset only; r3.4 is unchanged.
This was referenced Nov 9, 2026
Closed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What type of PR is this?
What this PR does / why we need it:
Adds three Spectral rules to the r4 ruleset that check the security scheme itself. Until now an API definition that referenced an undefined
openIdscheme, or definedopenIdastype: oauth2, passed validation with no finding, because the built-inoas3-operation-security-definedis disabled (it requires scopes underflows, which anopenIdConnectscheme does not have) and the OWASP rules only check that asecurityentry exists.camara-security-requirement-defined(error): every name in asecurityrequirement at root, operation and callback level must exist incomponents.securitySchemes.camara-security-openid-scheme(error): a secured API must defineopenIdwithtype: openIdConnect; a scheme oftype: oauth2under any name is reported too.camara-security-openid-url(warn):openIdConnectUrlmust use HTTPS and end in/.well-known/openid-configuration.The rules run on the resolved document, so a scheme given as
$reftoCAMARA_common.yamlis checked through its target. One FAQ entry covers all three rules. The r3.4 ruleset is unchanged.Which issue(s) this PR fixes:
Fixes #522
Special notes for reviewers:
A sweep over the current
mainof all API repositories hits only NetworkInsights (S-041, S-042), IoTSIMFraudPrevention (S-042) and three sandbox repositories without a public release (S-042). All other repositories, including every latest public release, stay clean. The regression fixture branchregression/r4.3-broken-spec-security-schemeis captured after merge; thetested_rulesentries and the theme row already point at it.Changelog input
Additional documentation