zaproxy / zaproxy/community-scripts

AlertOnUnexpectedContentTypes.js reports false positive for application/grpc header

Open Beginner friendly
#524 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
JavaScript
Stars
895
Forks
260
Avg merge
53m
Merged PRs (30d)
1

Description

Due to the fact that the current script does not include support for application/grpc.* it will report that the content-type is unexpected.

The fix is to check against all possible header types that could include application/grpc

AlertOnUnexpectedContentTypes.js

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the attached AlertOnUnexpectedContentTypes.js script and locate the content-type validation that flags application/grpc.* as unexpected. Check how supported header types are matched, then verify that the relevant application/grpc variants are accepted without suppressing unrelated unexpected content types.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
security
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Active
Clarity
Mostly clear
Newbie friendliness
72/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.