Skip to content

Vault Sentinel skips .tf, .env, .ini, .toml and other config files, and misses three secret kinds #7179

Closed

Description

@squid-protocol

Found by the first real-detector control for Vault Sentinel (#7155). vault-sentinel is both a required pre-gate step and a shipped tool. Today's coverage, from planted fakes through the real scanner with nothing mocked:

Gaps

1. Whole file types are never read. These reach deep_scanned=0 and pass without a word, even with a planted AWS key:

.tf, .ini, .toml, .conf, .cfg, .env (only a file named exactly .env or .env.* is caught), .bak, .ipynb

Vault Sentinel reuses ApertureFilter, which keeps source-like files for the engine. That's right for the engine and wrong for a secret scanner, because config files are where credentials tend to live.

2. Three secret kinds have no signature: AWS secret access key, Google API key, JSON web token. The file was read and nothing matched.

Also: secrets on long lines are missed. SecurityLens._armor empties lines of 250 or more characters (#7187), so an AWS key on a 509-character minified line exits 0, while the same key on a short line fails. Pinned as a strict expected failure.

3. A scan error reads as clean. An exception while reading or scanning a file is logged at debug level and the file passes (vault_sentinel.py, the except Exception in Phase 2).

4. Vault Sentinel exempts all of tests/. This is by design, but a real credential committed there is never reported.

The first two are pinned as strict expected failures in tests/security_auditing/test_vault_sentinel_control.py, so fixing one flips that test until it moves to the caught list.

Why this isn't fixed in the control PR

Widening what the scanner reads changes a shipped tool. It could slow scans and flood users with false positives, for example password = ... in a sample .ini. It needs a measurement first.

Plan

GitHub secret scanning and push protection are on for this repo, so these gaps matter most for users running vault-sentinel on their own code. How far GitHub's scanning covers them here hasn't been measured.

Activity

  1. added
    bug
    priority: high
    scope:core
    on Oct 30, 2026
  2. squid-protocol commented on Oct 30, 2026

    @squid-protocol
    OwnerAuthor

    Heads-up for workers: the fix for the file-type gap, long lines, the three missing secret kinds and the scan-error count is built and tested, on branch feat/vault-sentinel-widen, waiting for #7191 to merge before its PR opens. Please don't redo it. Measured on seven repos first. Still open after it lands: scan errors are printed, not failed, and tests/ stays exempt.

  3. squid-protocol commented on Oct 31, 2026

    @squid-protocol
    OwnerAuthor

    Churn run 7179-20261031T0245Z (host nyx) ended without a PR. #7179 already fixed by PR #7199 (all 5 plan boxes ticked); no PR needed. Open sibling: whether scan errors should fail the run is an owner call, no burned program needs it.

  4. squid-protocol commented on Oct 31, 2026

    @squid-protocol
    OwnerAuthor

    Done by #7199 (merged 2026-10-30): all five plan items ticked; churn run 7179-20261031T0245Z found nothing left to change. One open question is left, and it's the owner's call: should scan errors (now counted and printed in the summary) fail the run? If yes, it gets its own issue. Closing per owner 2026-10-31.

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

    bugpriority: highscope:core

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions