Skip to content

feat(java): detect Executor.interrupt without any permission check in the enclosing method (CWE-862) - #114

Open
ai-anant wants to merge 1 commit into
CodeVigilant:mainfrom
ai-anant:rule/jenkins-executor-interrupt-permission
Open

feat(java): detect Executor.interrupt without any permission check in the enclosing method (CWE-862)#114
ai-anant wants to merge 1 commit into
CodeVigilant:mainfrom
ai-anant:rule/jenkins-executor-interrupt-permission

Conversation

@ai-anant

Copy link
Copy Markdown

Adds a Java rule for the Jenkins framework: Executor.interrupt() (which aborts a running build) invoked in a method that contains no ACL permission guard.

Generic vulnerable shape:

  • a method calls $EXEC.interrupt($RESULT)
  • the method contains no hasPermission()/checkPermission() guard

Interrupting an executor aborts the running build and can leave artifacts/post-build steps inconsistent; it must be guarded by a permission check on the affected build's project (Item.CANCEL / Item.BUILD). Rule ID: codevigilant.java.jenkins.authz.executor-interrupt-without-permission (java/jenkins/authz tree). Includes pos/neg testcases, validated with semgrep (pos: 1 hit, neg: 0).

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