Skip to content

fix(releases): secret scan skips UTF-16 BOM files outside text extensions #105

Open

Description

@mrgoonie

Problem

The release content scanner (apps/web/app/lib/releases/release-scan.ts) only decodes UTF-16 (BOM) files whose extension is in mustBeText. A UTF-16 BOM file with another extension (e.g. x.reg) is not decoded, so the secret scan misses credentials inside it.

Repro

Publish a release containing x.reg (UTF-16LE with BOM) holding a fake AWS access key id → state published, no findings. The same bytes named x.ps1 → quarantined (secret-aws-access-key-id).

Suggested fix

Decode any file starting with a UTF-16 BOM (within the scan size cap) for the secret scan, regardless of extension. Add a test.

Found during isolated review of #96 (pre-existing, not a regression).

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    ai-handleFound during automated run

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions