Skip to content

fix(security): the masker leaves names after token or Secret alone #5240

Closed

Description

@dan-petty

Problem or Motivation

The secret masker replaces plain words that follow the word token or Secret with <masked-token>, and devops roadmap intake then refuses the candidate ("The candidate's body holds what looks like a secret ... filed nothing"). On 2026-11-12, two candidates with no secret were refused:

  • A sentence where the word Secret is followed directly by a resource name (the Kubernetes object of kind Secret, whose name is devops-cli): the masker replaced the name with <masked-token>.
  • The subcommand revoke-self of the vault CLI group token, written as a command line: the masker replaced the subcommand with <masked-token>.

Each refusal stops a filing run, and an agent must reword correct text to get past the check.

Proposed Solution & Architectural Design

  • In src/devops_cli/security/sanitizer.py, the rule that masks a value after a key word matches only an assignment form (token=, token:, "token": "..., an Authorization header, a flag --token <value>), or a value that has the shape of a credential (a known prefix, or a high-entropy run of the length that the rule names). A lower-case word with hyphens after Secret or token is not masked.
  • Keep every current true positive: add the two shapes above as negative cases (build the test strings in the test from parts, so this issue text stays readable by the masker) and keep the existing positive cases.

Target Subsystem

Security: the secret masker (src/devops_cli/security/sanitizer.py) and its use in devops roadmap intake.

Existing Tool Considered

The masker already has its rule table and tests; the change narrows one rule. A detector library (for example detect-secrets) was not chosen for this small fix.

Acceptance Criteria

  • Tests: the two shapes above pass through unchanged; each existing positive case of the sanitizer tests still masks.
  • uv run devops ci fail-to-pass --base origin/main shows the two negative cases fail on the base.
  • devops roadmap intake --dry-run with a body that holds the two shapes plans a filing.

Source: #5233

Activity

  1. added
    source/agent
    on Nov 12, 2026
  2. added
    type/bug
    scope/security
    status/new
    value/medium
    effort/low
    on Nov 12, 2026
  3. dan-petty commented on Nov 12, 2026

    @dan-petty
    OwnerAuthor
  4. added
    priority/p2-medium
    on Nov 12, 2026
  5. added
    status/in-progress
    status/in-review
    and removed
    status/new
    status/in-progress
    on Nov 15, 2026
  6. removed
    status/in-review
    on Nov 15, 2026
  7. devops-cli-service commented on Nov 15, 2026

    @devops-cli-service
    Contributor
  8. devops-cli-service commented on Nov 15, 2026

    @devops-cli-service
    Contributor

    Live since 2026-11-15 13:55 UTC

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

    effort/lowpriority/p2-mediumscope/securitysource/agenttype/bugvalue/medium

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions