Skip to content

feat(java): detect synchronous blocking remoting calls inside RunListener callbacks (CWE-400) - #128

Open
ai-anant wants to merge 1 commit into
CodeVigilant:mainfrom
ai-anant:rule/java-jenkins-runlistener-blocking-call
Open

feat(java): detect synchronous blocking remoting calls inside RunListener callbacks (CWE-400)#128
ai-anant wants to merge 1 commit into
CodeVigilant:mainfrom
ai-anant:rule/java-jenkins-runlistener-blocking-call

Conversation

@ai-anant

Copy link
Copy Markdown

New rule in a new java/jenkins tree: detects a blocking, unbounded remoting call ($CH.call(...) on a channel) inside a RunListener onFinalized/onCompleted callback.

Why it matters: Jenkins listener callbacks execute on the build executor thread of the controller. A synchronous channel round-trip there has no timeout, so an unresponsive agent pins the executor indefinitely; repeated failures can exhaust every executor (controller-side DoS, CWE-400). The core performs agent probes asynchronously (callAsync + bounded future timeout on a dedicated thread) - the rule recommends mirroring that.

Rule id: codevigilant.java.jenkins.dos.runlistener.synchronous-call

  • severity HIGH, confidence MEDIUM, metadata cwe/owasp/technology/references/license
  • validated with semgrep 1.172 (semgrep --validate --config java/ clean)
  • pos repro fires (1 match), neg repro (callAsync / local-only) does not
  • 0 false positives across 30+ cloned Jenkins plugin sources

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