fix(security): remediate OWASP/CWE audit findings (2026-06-30) - #121
Merged
Conversation
…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.
Contributor
📦 Artifacts
🧪 Java Unit Tests
🔁 Unreleased Commits5 commits since
|
fdelbrayelle
disabled auto-merge
June 30, 2026 21:14
Contributor
Tests report quick summary:success ✅ > tests: 13, success: 13, skipped: 0, failed: 0 unfold for details
|
fdelbrayelle
enabled auto-merge (squash)
June 30, 2026 21:58
…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>
jymaire
approved these changes
Jul 1, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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
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 thepip installshell command; any value containing shell metacharacters throwsIllegalArgumentExceptioninstead of being executed.src/main/java/io/kestra/plugin/soda/Scan.java:182— The renderedconfigurationmap is now passed through a recursivescrubSensitiveValueshelper before being stored inOutput.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 buildpassesReferences