Skip to content

feat(java): detect HttpGet/HttpPut created with non-literal URL (CWE-918) - #115

Open
ai-anant wants to merge 2 commits into
CodeVigilant:mainfrom
ai-anant:rule/java-httpclient-get-put-ssrf
Open

feat(java): detect HttpGet/HttpPut created with non-literal URL (CWE-918)#115
ai-anant wants to merge 2 commits into
CodeVigilant:mainfrom
ai-anant:rule/java-httpclient-get-put-ssrf

Conversation

@ai-anant

Copy link
Copy Markdown

Adds a rule detecting Apache HttpClient GET/PUT request objects constructed from a non-literal URL (complements the existing HttpPost rule). When the URL is derived from configuration, environment or other user-influenced input, the Jenkins controller can be coerced into sending requests (with any attached headers/credentials) to attacker-chosen hosts — SSRF. The rule excludes fully literal URLs.

Rule: codevigilant.java.jenkins.ssrf.httpclient-get-put-unvalidated-url
Validated with semgrep --validate; fires on non-literal HttpGet/HttpPut, silent on literal URLs.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant