Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Dec 16, 2025

The secret scanning API calls were missing generic_private_key from the hardcoded list of generic secret types, causing these alerts to be excluded from CSV exports.

Changes

  • Added generic_private_key to the generic secret types filter in three functions:
    • get_repo_ss_alerts() - repository-level scanning
    • get_org_ss_alerts() - organization-level scanning
    • get_enterprise_ss_alerts() - enterprise-level scanning

The generic types list now includes all 10 non-provider patterns:
ec_private_key, generic_private_key, http_basic_authentication_header, http_bearer_authentication_header, mongodb_connection_string, mysql_connection_string, openssh_private_key, pgp_private_key, postgres_connection_string, rsa_private_key

# Before
generic_secret_types = "password,ec_private_key,http_basic_authentication_header,..."

# After  
generic_secret_types = "password,ec_private_key,generic_private_key,http_basic_authentication_header,..."
Original prompt

Non-provider patterns - Ensure each of these generic secret types are in the list:

Provider Token Description Precision
Generic ec_private_key Elliptic Curve (EC) private keys used for cryptographic operations High
Generic generic_private_key Cryptographic private keys with -----BEGIN PRIVATE KEY----- header High
Generic http_basic_authentication_header HTTP Basic Authentication credentials in request headers Medium
Generic http_bearer_authentication_header HTTP Bearer tokens used for API authentication Medium
Generic mongodb_connection_string Connection strings for MongoDB databases containing credentials High
Generic mysql_connection_string Connection strings for MySQL databases containing credentials High
Generic openssh_private_key OpenSSH format private keys used for SSH authentication High
Generic pgp_private_key PGP (Pretty Good Privacy) private keys used for encryption and signing High
Generic postgres_connection_string Connection strings for PostgreSQL databases containing credentials High
Generic rsa_private_key RSA private keys used for cryptographic operations High


💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.

Co-authored-by: felickz <1760475+felickz@users.noreply.github.com>
Copilot AI changed the title [WIP] Ensure generic secret types are included in the list Add generic_private_key to secret scanning generic types list Dec 16, 2025
Copilot AI requested a review from felickz December 16, 2025 19:55
Copy link
Contributor

@felickz felickz left a comment

Choose a reason for hiding this comment

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

LGTM

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants