Skip to content

feat(java): detect Jenkins item resolution via getItem(...) without an explicit permission argument (CWE-862) - #154

Open
ai-anant wants to merge 2 commits into
CodeVigilant:mainfrom
ai-anant:rule/java-jenkins-getitem-missing-permission
Open

feat(java): detect Jenkins item resolution via getItem(...) without an explicit permission argument (CWE-862)#154
ai-anant wants to merge 2 commits into
CodeVigilant:mainfrom
ai-anant:rule/java-jenkins-getitem-missing-permission

Conversation

@ai-anant

Copy link
Copy Markdown

Summary

Adds a Java rule for the Jenkins/Core tree detecting item resolution calls that omit an explicit ACL permission argument.

Pattern

Jenkins code commonly resolves a project/item from the Jenkins root using the 3-argument overload, which carries no argument. Whether the caller is allowed to READ the returned item is then left entirely to the caller. When the caller forgets a separate (or a 4-arg form), a user can be handed an item they may not be permitted to read, and any subsequent rendering of that item's data (builds, change logs, configuration) becomes a cross-project / cross-folder information disclosure (CWE-862, CWE-200).

The rule flags the 3-arg overload and excludes the safe 4-arg () form.

Test

  • Positive: 3-arg -> fires (2/2)
  • Negative: 4-arg -> does not fire
  • passes

Metadata: cwe 862 / owasp A01, technology jenkins, confidence high.

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