Skip to content

Security/all fixes combined - #24

Open
sunny-se wants to merge 13 commits into
mainfrom
security/all-fixes-combined
Open

Security/all fixes combined#24
sunny-se wants to merge 13 commits into
mainfrom
security/all-fixes-combined

Conversation

@sunny-se

Copy link
Copy Markdown
Collaborator

No description provided.

sunny-se and others added 13 commits May 26, 2026 14:28
F-001 / DEVA11Y-473 — The default download URL used plaintext HTTP
(CWE-319), allowing MitM to substitute a malicious binary.
Switch to HTTPS to enforce TLS.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
F-002 / DEVA11Y-474 — All three cli.sh variants (bash, zsh, fish)
downloaded the CLI binary over plaintext HTTP (CWE-319), enabling
MitM binary substitution. Switch to HTTPS.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
F-012 / DEVA11Y-481 — The plugin declared unrestricted .all() network
scope (CWE-250) which amplifies blast radius of other findings.
Switch to .all(ports: []) matching what shell scripts already enforce.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
F-004 / DEVA11Y-476 — The Semgrep workflow used an unpinned image tag
(CWE-829), enabling tag-poisoning attacks. Pin to SHA256 digest.
This is the chain-breaker for C-001 (DEVA11Y-485, CVSS 10.0).

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
F-003 / DEVA11Y-475 — script_self_update() fetched the script from
a mutable branch head with no integrity verification (CWE-494).
The ^#! regex check is trivially bypassed. Remove self-update
entirely; users should update via git pull or package manager.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
F-005 / DEVA11Y-477 — The generated Package.swift pinned the
AccessibilityDevTools dependency to branch "main" (CWE-829),
allowing any push to main to execute in the plugin sandbox.
Pin to a specific revision SHA for supply-chain integrity.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
F-006 / DEVA11Y-478 — script_self_update() in spm.sh scripts fetched
from a mutable branch head with no integrity verification (CWE-494).
Same pattern as F-003. Remove self-update entirely.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
F-008 / DEVA11Y-479 — parseOverride() accepted file:// URLs and bare
paths (CWE-918), enabling SSRF and local-file exfiltration via bsdtar.
Restrict to HTTPS-only to prevent local file access.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
F-010 / DEVA11Y-480 — extractVersion() did not validate the version
string parsed from HTTP redirect filenames (CWE-22). A crafted
filename with ../ segments could write outside the cache directory.
Add character allowlist and reject traversal sequences.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
F-013 / DEVA11Y-482 — prepareArtifact had a TOCTOU race (CWE-362)
where the check-delete-create-download sequence left a large window
for parallel builds to corrupt state. Download into a temp directory
and atomically move to the version directory after completion.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
F-014 / DEVA11Y-483 — Concurrent spm.sh instances shared CWD
(CWE-362), causing cleanup trap to delete sibling's Package.swift.
Use mktemp -d for an isolated working directory per invocation.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
F-015 / DEVA11Y-484 — bsdtar extraction had no size or entry-count
limit (CWE-400), allowing decompression bomb DoS. Add a 100 MB post-
extraction size check that removes the output and errors on violation.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…-url', 'origin/fix/DEVA11Y-474-https-shell-download', 'origin/fix/DEVA11Y-475-remove-cli-self-update', 'origin/fix/DEVA11Y-476-pin-semgrep-image', 'origin/fix/DEVA11Y-477-pin-spm-dependency', 'origin/fix/DEVA11Y-478-remove-spm-self-update', 'origin/fix/DEVA11Y-479-block-file-scheme', 'origin/fix/DEVA11Y-480-sanitize-version-string', 'origin/fix/DEVA11Y-481-restrict-network-scope', 'origin/fix/DEVA11Y-482-atomic-cache-update', 'origin/fix/DEVA11Y-483-spm-tmpdir-isolation' and 'origin/fix/DEVA11Y-484-extraction-size-limit' into security/all-fixes-combined
@sunny-se
sunny-se requested a review from a team as a code owner May 26, 2026 09:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

1 participant