Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 31 additions & 0 deletions java/jenkins/views/secret-field-textbox.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
rules:
- id: codevigilant.java.jenkins.views.secret-field-textbox
patterns:
- pattern: |
<f:entry field="$FIELD">
<f:textbox />
</f:entry>
- metavariable-regex:
metavariable: $FIELD
regex: (?i).*(api.?key|secret|token|passwd|password|credential).*
message: |
Detected a Jenkins config view (jelly) that renders a secret-typed field
with f:textbox instead of f:password. Secret values (API keys, tokens,
passwords) must use f:password so the value is not echoed into the
rendered config page, browser history or page source and so changes
require an explicit re-entry. Rendering the value in a plain textbox
exposes the credential to anyone able to view the page and can leak it
through backups, screenshots or client-side artifacts.
metadata:
category: security
cwe: "CWE-522: Insufficiently Protected Credentials"
owasp: "A07:2021 - Identification and Authentication Failures"
technology: jenkins
confidence: MEDIUM
references:
- https://www.jenkins.io/doc/developer/security/
source: independent security review
license: MIT
languages: [xml]
mode: search
severity: WARNING