Skip to content

Conversation

@bananabr
Copy link

This script detects potentially exposed MCP servers by sending MCP initialization requests

@psiinon
Copy link
Member

psiinon commented Oct 30, 2025

Logo
Checkmarx One – Scan Summary & Details99b5fcf5-0b49-40d0-a37b-2d6c08d61cf9

Great job! No new security vulnerabilities introduced in this pull request


Use @Checkmarx to reach out to us for assistance.

Just send a PR comment with @Checkmarx followed by a natural language request.

Examples: @Checkmarx how are you able to help me? @Checkmarx rescan this PR

@psiinon
Copy link
Member

psiinon commented Nov 11, 2025

@bananabr thanks for this PR!

Am I right in thinking that the paths you're checking should be absolute, ie https://www.example.com/mcp or should they be relative (and therefore recurse through the tree), e.g. https://www.example.com/a/mcp, https://www.example.com/a/b/mcp?

Do you have any links to example MCP servers which this rule detects so we can test it?

The build is failing, but it looks like you can fix that with ./gradlew :spotlessApply

@kingthorin
Copy link
Member

The file name and code link don't match.

They should also follow the naming guidance: https://github.com/zaproxy/community-scripts/blob/main/CONTRIBUTING.md#naming-scripts


function getMetadata() {
return ScanRuleMetadata.fromYaml(`
id: 100030
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please reserve an ID by opening a PR against: https://github.com/zaproxy/zaproxy/blob/main/docs/scanners.md

category: server
risk: medium
confidence: medium
cweId: 200 # CWE-200: Information Exposure
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

200 should not be mapped, please use something more specific.

image

Comment on lines +340 to +341
.setCweId(200)
.setWascId(13)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Details that are set/common in the metadata block don't need to be re-set here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

3 participants