Skip to content

Restrict the type of values that can be posted #1879

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Jun 18, 2025

Conversation

prabhu
Copy link
Collaborator

@prabhu prabhu commented Jun 17, 2025

The idea is to cut down on injection possibilities.

curl -X POST http://localhost:9090/sbom \
        -H 'Content-Type: application/json' \
        -d '{
      "url": "https://github.com/HooliCorp/vulnerable-aws-koa-app.git",
      "type": { "foo": "bar" },
      "multiProject": "true"
    }'
{"error":"TypeError: Invalid value type: object.","details":"Options can only be of string, number, and array type. No object values are allowed."}

Signed-off-by: Prabhu Subramanian <prabhu@appthreat.com>
@prabhu prabhu added mode:server cdxgen used as server security labels Jun 17, 2025
@prabhu prabhu requested review from malice00 and setchy June 17, 2025 22:43
Signed-off-by: Prabhu Subramanian <prabhu@appthreat.com>
@prabhu
Copy link
Collaborator Author

prabhu commented Jun 17, 2025

@bandhan-majumder can you test this and make sure we have not broken any legitimate functionality?

@bandhan-majumder
Copy link
Collaborator

bandhan-majumder commented Jun 18, 2025

I tested with all the possible options, it's working fine.

@prabhu prabhu merged commit 5e5d54c into master Jun 18, 2025
72 checks passed
@prabhu prabhu deleted the feature/restrict-server-body-types branch June 18, 2025 12:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants