Skip to content

fix(security): remediate OWASP/CWE audit findings (2026-06-30) - #121

Merged
fdelbrayelle merged 5 commits into
mainfrom
fix/security-audit-20260630
Jul 1, 2026
Merged

fix(security): remediate OWASP/CWE audit findings (2026-06-30)#121
fdelbrayelle merged 5 commits into
mainfrom
fix/security-audit-20260630

Conversation

@fdelbrayelle

Copy link
Copy Markdown
Member

Summary

Remediates all findings (CRITICAL/HIGH/MEDIUM/LOW) from the 2026-06-30 automated security audit against OWASP Top 10 (2025), CWE Top 25, and OWASP ASVS Level 1.

Findings Fixed

  • HIGH — Shell injection via user-controlled pip install requirements — src/main/java/io/kestra/plugin/soda/AbstractSoda.java:191 — Each rendered requirement string is now validated against a strict allowlist pattern (^[a-zA-Z0-9_\-.\[\]>=<,!~ ]+$) before being interpolated into the pip install shell command; any value containing shell metacharacters throws IllegalArgumentException instead of being executed.
  • HIGH — Rendered database configuration (including secrets) stored in task Output — src/main/java/io/kestra/plugin/soda/Scan.java:182 — The rendered configuration map is now passed through a recursive scrubSensitiveValues helper before being stored in Output.configuration, redacting any leaf value whose key matches common secret patterns (password, secret, token, key, credential, account_info_json, private_key, api_key, access_key, auth, etc.) with a ****** placeholder, so plaintext secrets no longer leak into execution state visible via the UI/API.

No MEDIUM or LOW findings were reported in the audit EPIC for this repository.

Testing

  • ./gradlew build passes
  • No regressions in existing tests

References

…audit

Fixes all CRITICAL/HIGH/MEDIUM/LOW findings identified in the automated security audit.
Part of security audit EPIC. See kestra-io/kestra-ee#9092 for full scope.
@fdelbrayelle fdelbrayelle added the kind/security Security-related issue label Jun 30, 2026
@fdelbrayelle
fdelbrayelle enabled auto-merge (squash) June 30, 2026 21:09
@github-actions

github-actions Bot commented Jun 30, 2026

Copy link
Copy Markdown
Contributor

📦 Artifacts

Name Size Updated Expiration
jar 37.82 KB Jul 1, 26, 12:16:33 PM UTC Jul 8, 26, 12:16:33 PM UTC

🧪 Java Unit Tests

TestsPassed ✅SkippedFailedTime ⏱
Java Tests Report13 ran13 ✅0 ⚠️0 ❌51s 358ms

🔁 Unreleased Commits

5 commits since v1.2.4

SHA Title Author Date
062ec7d chore(deps): group io.kestra.gradle.* dependabot updates Malay Dewangan Jun 30, 26, 10:20:04 AM UTC
4f20ba2 build(deps): bump the kestra-gradle-plugins group with 4 updates (#117) dependabot[bot] Jul 1, 26, 11:56:41 AM UTC
9f951f7 build(deps): bump com.gradleup.shadow from 9.4.2 to 9.4.3 (#112) dependabot[bot] Jul 1, 26, 12:03:16 PM UTC
34fc42b build(deps): bump gradle-wrapper from 9.6.0 to 9.6.1 (#116) dependabot[bot] Jul 1, 26, 12:03:36 PM UTC
4a497be fix(security): remediate OWASP/CWE audit findings (2026-06-30) (#121) François Delbrayelle Jul 1, 26, 12:16:10 PM UTC

@fdelbrayelle
fdelbrayelle disabled auto-merge June 30, 2026 21:14
@github-actions

github-actions Bot commented Jun 30, 2026

Copy link
Copy Markdown
Contributor

Tests report quick summary:

success ✅ > tests: 13, success: 13, skipped: 0, failed: 0

unfold for details
Project Status Success Skipped Failed
plugin-soda success ✅ 13 0 0

@fdelbrayelle
fdelbrayelle enabled auto-merge (squash) June 30, 2026 21:58
jymaire and others added 4 commits July 1, 2026 14:04
…ering

Replace the SAFE_REQUIREMENT_PATTERN allowlist with per-token single-quoting.
Inside single quotes /bin/sh treats every character literally, so all shell
metacharacters are neutralized while valid requirements.txt syntax (version
ranges, extras, VCS URLs, environment markers) is preserved. Also fixes a
latent bug where an unquoted `pkg>=1.0` had its `>` parsed as shell redirection.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Add fast, dependency-free tests for the two audit-remediation helpers:
shellQuote (metacharacter neutralization, embedded-quote escaping, version
operators, env markers) and scrubSensitiveValues (top-level and nested-map
redaction, secret-key variants, non-sensitive values preserved).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…keys

scrubSensitiveValues now recurses through List values (not just Maps), so
secrets nested inside a list of connection maps are redacted too. isSensitiveKey
now matches whole tokens (split on separators and camelCase) plus a compound
allowlist, instead of substring containment — so benign keys like keyspace,
sortkey and author are no longer redacted while api_key/apiKey/client_secret/
account_info_json still are. Adds unit tests for both behaviors.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Match sensitive keys by substring again so any key containing a sensitive
fragment (keyfile, keyspace, client_secret, ...) is redacted, favoring safety
over occasional masking of benign values. Update test accordingly.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@fdelbrayelle
fdelbrayelle merged commit 4a497be into main Jul 1, 2026
5 checks passed
@fdelbrayelle
fdelbrayelle deleted the fix/security-audit-20260630 branch July 1, 2026 12:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

kind/security Security-related issue

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants