Skip to content

PowerShell: narrow unverified downloads to high-impact execution - #411

Open
Chanel (chanel-y) wants to merge 1 commit into
mainfrom
verify-hash-improvements
Open

Chanel (chanel-y) wants to merge 1 commit into
mainfrom
verify-hash-improvements

Conversation

@chanel-y

Copy link
Copy Markdown

Summary

  • Require an insecure HTTP or explicitly modeled remotely controlled download to reach code execution/loading along an unverified path.
  • Track artifact identity through file lifecycle operations, content reads/writes, and archive members; link findings to the downstream execution site.
  • Require complete pinned hash comparisons or expected-publisher signature checks, enforced before use on the relevant path. Model Authenticode and selected GPG/Cosign policies without trusting ignored results or overwritten native exit codes.
  • Expand regression fixtures and update query help and examples.

Intentional scope

Fixed HTTPS origins without modeled remote control, download-only/configuration-only retrieval, and extraction without execution are excluded. This favors high-impact candidates over broad coverage; it does not establish deployment-specific severity. Lifecycle analysis is within a control-flow scope, so custom wrappers and unresolved runtime paths can be missed.

Validation

  • Targeted CWE-494 CodeQL suite passed with CLI 2.26.2.
  • Query formatting, PowerShell fixture/example syntax, qhelp XML, and git diff --check passed.

Campaign provenance and the submitted run link will be recorded on this PR.

Track download origins, artifact lifecycles, and per-use verification. Require pinned hashes or expected-publisher checks before execution, and update regressions and documentation.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

Copilot-Session: 40cf6a34-b7f5-4bc1-8030-06139cd6157f
@chanel-y

Copy link
Copy Markdown
Author

Campaign submitted

CodeQL Central campaign run

  • Source commit: b33fe913bc4c3894c38d92d40a29f1ac2c66a65f on verify-hash-improvements.
  • Query: powershell/download-without-integrity-check.
  • Scope: master/main powershell (PowerShell snapshots on master and main).
  • Query source SHA-256: A95A6FD462315411C1345B05D0556D4C519765AE413F7F4D4D76BD261B7AA9EC.
  • Bundled with CodeQL CLI 2.26.2 from the clean source checkout, requiring the exact source revision.

Central accepted the submission. Campaign results and triage are not yet reported here.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant