Add API media-type parser evidence gates#2290
Open
Errordog2 wants to merge 1 commit into
Open
Conversation
4 tasks
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.
Skill Improvement ($50-150 Bounty)
Skill Modified
Skill name:
api-securitySkill path:
skills/appsec/api-security/What Was Wrong
Issue #2281 notes that the current API security skill can over-trust the documented JSON path. An endpoint may have schema validation, authorization, and business-rule checks for
application/json, while the runtime also acceptstext/plain, form bodies, multipart metadata, raw webhook bodies, XML, vendor media types, charset variants, or alternateAcceptresponse formats through parser paths that do not enforce equivalent controls.That creates false assurance and missed findings for API3/API8/API9/API10 cases:
What This PR Fixes
api-securityto1.0.1.Media-Type, Parser, and Representation Equivalence Gatebefore OWASP API Top 10 evaluation.Media-Type and Representation Evidencetable and per-finding parser/representation evidence.Evidence
Before: Reviewers could mark an endpoint safe after checking the JSON/OpenAPI path, even if alternate body parsers or response formats lacked equivalent validation and authorization.
After: Reviewers must prove unsupported media types are rejected or that each accepted parser/representation enforces equivalent validation, authorization, field filtering, and error handling before passing the endpoint.
Test Cases Added/Updated
tests/vulnerable/)tests/benign/)This existing skill stores examples in Markdown guidance files; the change keeps scope to
SKILL.md.Validation
git diff --check.github/workflows/lint-skills.ymlindex.yamlfile-existence check matching.github/workflows/validate-index.ymlskills/androles/1.0.1,Media-Type, Parser, and Representation Equivalence Gate, API-PARSER triggers, multipart metadata, raw-body handling, spec-to-runtime drift, Not Evaluable parser behavior, response-negotiation, and report output coverageBounty Tier
Bounty Info
Fixes #2281