Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion pkg/handlers/apk_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ func TestAPKHandler(t *testing.T) {
matchString string
}{
"apk_with_3_leaked_keys": {
archiveURL: "https://github.com/joeleonjr/leakyAPK/raw/refs/heads/main/aws_leak.apk",
archiveURL: "https://raw.githubusercontent.com/MuneebUllahKhan222/asset-hosting/refs/heads/main/aws_leak.apk",
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Test fetches APK from untrusted personal repository

Medium Severity

The test now downloads an APK binary from a personal GitHub account (MuneebUllahKhan222/asset-hosting) during CI. Any owner of that account can replace aws_leak.apk with arbitrary content at any time — a malicious APK could exploit parser vulnerabilities in the handler under test or in underlying zip/archive libraries. Additionally, this is identical in fragility to the original problem: if the repo is deleted or made private, the test breaks again. Test fixtures with sensitive-looking secrets should be stored in the project's own repository or a controlled, immutable artifact store.

Fix in Cursor Fix in Web

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is how we are going to do it for now. Later on we will have to store the artifact of a GCP bucket or Trufflehog's github repo.

expectedChunks: 942,
// Note: the secret count is 4 instead of 3 b/c we're not actually running the secret detection engine,
// we're just looking for a string match. There is one extra string match in the APK (but only 3 detected secrets).
Expand Down
Loading