-
Notifications
You must be signed in to change notification settings - Fork 22
Open
Labels
ASVSAnything related to ASVS requirementsAnything related to ASVS requirementsL1ASVS L1 requirementASVS L1 requirementLLMAnything related to LLM audit performanceAnything related to LLM audit performancesecurityIssues related to security postureIssues related to security posture
Description
ASVS Requirements: V12.2.1, V12.2.2
CWE: CWE-295 (Improper Certificate Validation), CWE-319 (Cleartext Transmission of Sensitive Information)
Severity: MEDIUM
File: atr/static/sh/download-urls.sh (lines ~6–13)
Description
The download shell script has two issues:
- No
--proto '=https'flag to restrict curl to HTTPS-only connections, meaning HTTP URLs would be silently accepted. - The
${CURL_EXTRA:-}environment variable is directly interpolated into curl commands, allowing callers to inject--insecureor-kflags that disable TLS certificate verification.
Current code
curl ${CURL_EXTRA:-} -fsS "$_url_of_urls" | while IFS= read -r _url_and_path
do
_url=${_url_and_path%% *}
_path=${_url_and_path#* }
curl ${CURL_EXTRA:-} --create-dirs -fsS "$_url" -o "$_path"
doneRecommended fix
Maybe add a comment for the audit to understand this
Suggestion from audit:
Replace CURL_EXTRA with specific validated options, and enforce HTTPS and TLS 1.2+:
_curl_secure() {
curl --proto '=https' --tlsv1.2 -fsS "$@"
}
_curl_secure "$_url_of_urls" | while IFS= read -r _url_and_path
do
_url=${_url_and_path%% *}
_path=${_url_and_path#* }
_curl_secure --create-dirs "$_url" -o "$_path"
doneIf proxy support is needed, validate via specific environment variables (HTTPS_PROXY) rather than arbitrary flag injection.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
ASVSAnything related to ASVS requirementsAnything related to ASVS requirementsL1ASVS L1 requirementASVS L1 requirementLLMAnything related to LLM audit performanceAnything related to LLM audit performancesecurityIssues related to security postureIssues related to security posture