feat: http method checker workflow#42
Merged
bebiksior merged 3 commits intocaido-community:mainfrom Jul 30, 2025
GangGreenTemperTatum:workflows/ads-http-method-check
Merged
feat: http method checker workflow#42bebiksior merged 3 commits intocaido-community:mainfrom GangGreenTemperTatum:workflows/ads-http-method-check
bebiksior merged 3 commits intocaido-community:mainfrom
GangGreenTemperTatum:workflows/ads-http-method-check
Conversation
Collaborator
|
Hey @GangGreenTemperTatum, thanks for contributing!! Could you move source code from the definition to a external Thanks again, we really apprieciate it :D |
Contributor
Author
thanks again @bebiksior ! :) super appreciate your quick anowledgement and assistance on this one! chore: refactor definition to a external javascript.ts file hopefully i believe this should achieve that request :) plmk if i can help with anything else! |
bebiksior
approved these changes
Jul 30, 2025
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.
http method checker workflow
This change introduces an asynchronous function run designed to perform a dynamic security check against an HTTP endpoint by probing its supported HTTP methods via an
OPTIONSrequest.Detailed Behavior:
The function accepts an input context containing the original HTTP request and a response handler, along with an SDK instance for sending requests and creating findings.
OPTIONS.OPTIONSrequest (probe) to the same host and path as the original request.OPTIONSprobe, it inspects the headers for allowed HTTP methods from either theAlloworAccess-Control-Allow-Methodsheaders.The allowed methods are parsed and compared against the original request method.
If the original method is not included in the allowed methods list returned by the server, the function creates a finding via the SDK, flagging the discrepancy as "Extraneous HTTP methods exposed."
The finding includes a descriptive message, the original request, the probe response, and a deduplication key to avoid duplicate reports.
Deduplication Key:
The deduplication key is constructed as:
`${host}|${path}|${origMethod}|${allowHeader}`hostis the request host,pathis the request path,origMethodis the original HTTP method of the request,allowHeaderis the raw value from the Allow or Access-Control-Allow-Methods header.This key ensures unique identification of discrepancies per endpoint and method mismatch, preventing redundant findings.
Example Report:
Title: Extraneous HTTP methods exposed
Description: OPTIONS listed methods [GET, POST, PUT], original: DELETE
Host: example.com
Path: /api/resource
Original Method: DELETE
Allowed Methods: GET, POST, PUT
Deduplication Key:
example.com|/api/resource|DELETE|GET,POST,PUTThis report indicates that the original HTTP method (
DELETE) is not advertised as allowed by the server’sOPTIONSresponse, highlighting a potential security or configuration issue.