Skip to content

Private key test strings block PRs that touch the reviewer's own tests #35

Open

Description

@irvingpop

Summary

A PR that touches review/tests/unit/test_collect.py or test_render.py gets non-waivable incomplete-coverage hard blocks. The cause is the test strings that hold a -----BEGIN ... PRIVATE KEY----- header. They are built with Python +, so the code after the header is not key material, and rule R-KEYBLOCK marks the file unavailable. This happened on #34.

Splitting the header strings in our tests would stop the blocks. But a split header is also a way any author can avoid the header check today. So first check what the detection covers.

Questions

  1. How does the prefilter detect a committed private key: the header only, or the key body too?
  2. Does the threat model count an author who commits a key on purpose and splits the header? That author has easier ways, such as base64 encoding.
  3. Is there a gap to fix in detection, separate from our own test files?
  4. Then decide: split the headers in our tests, move the key fixtures, or keep the admin bypass for PRs that touch these files.

Not in scope

Changing what the gate blocks without a spec update.

🤖 Generated with Claude Code

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

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions