Skip to content

Commit 2696e7a

Browse files
mchammer01jc-clark
andauthored
[SRA + secrets] Improve discoverability with SEO updates to GHSP/ secret scanning docs (#60589)
Co-authored-by: Joe Clark <31087804+jc-clark@users.noreply.github.com>
1 parent 5bec0ee commit 2696e7a

File tree

5 files changed

+64
-70
lines changed

5 files changed

+64
-70
lines changed

content/code-security/concepts/secret-security/about-push-protection.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ category:
1818

1919
## What is push protection?
2020

21-
Push protection is a {% data variables.product.prodname_secret_scanning %} feature designed to prevent sensitive information, such as secrets or tokens, from ever being pushed to your repository. Unlike {% data variables.product.prodname_secret_scanning %}, which detects secrets after they have been committed, push protection proactively scans your code for secrets during the push process, then blocks the push if any are detected.
21+
Push protection is a {% data variables.product.prodname_secret_scanning %} feature designed to prevent hardcoded credentials, such as secrets or tokens, from ever being pushed to your repository. Rather than alerting you to credential leaks after the fact, push protection blocks pushes that contain secrets _before_ they reach your repository.
2222

2323
## How push protection works
2424

@@ -74,9 +74,9 @@ If you want greater control over which contributors can bypass push protection a
7474

7575
## Benefits of push protection
7676

77-
* **Preventative security:** Push protection acts as a frontline defense mechanism by scanning code for secrets at the time of the push. This preventative approach helps to catch potential issues before they are merged into a repository.
77+
* **Preventative security:** Push protection acts as a frontline defense mechanism by scanning code for hardcoded secrets at the time of the push. This preventative approach helps prevent credential leaks before they become ingrained in the repository's history, making it easier to address and remediate threats.
7878
* **Immediate feedback:** Developers receive instant feedback if a potential secret is detected during a push attempt. This immediate notification allows for quick remediation, reducing the likelihood of sensitive information being exposed.
79-
* **Reduced risk of data leaks:** By blocking commits that contain sensitive information, push protection significantly reduces the risk of accidental data leaks. This helps in safeguarding against unauthorized access to your infrastructure, services, and data.
79+
* **Reduced risk of credential leaks:** By blocking commits that contain hardcoded credentials, push protection significantly reduces the risk of accidental credential leaks and secret sprawl. This helps in safeguarding against potential breaches and maintaining the integrity of the codebase.
8080
* **Efficient secret management:** Instead of retrospectively dealing with exposed secrets, developers can address issues at the source. This makes secret management more efficient and less time-consuming.
8181
* **Bypass functionality for flexibility:** For cases where false positives occur or when certain patterns are necessary, you can bypass push protection for users, and designated users can use the delegated bypass feature to bypass push protection for repositories. {% ifversion push-protection-org-enterprise-exemptions %}Additionally, you can exempt trusted actors {% ifversion push-protection-repo-exemptions %}{% else %}at the organization and enterprise levels {% endif %}from push protection entirely. {% endif %}This provides flexibility without compromising overall security.
8282
* **Ability to detect custom patterns (for repositories in organizations):** Organizations can define custom patterns for detecting secrets unique to their environment. This customization ensures that push protection can effectively identify and block even non-standard secrets.

content/code-security/concepts/secret-security/about-secret-scanning.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ category:
1919
- Protect your secrets
2020
---
2121

22-
When credentials like API keys and passwords are committed to repositories, they become targets for unauthorized access. {% data variables.product.prodname_secret_scanning_caps %} automatically detects these exposed secrets so you can secure them before they're exploited.
22+
When credentials like API keys and passwords are committed to repositories as hardcoded secrets, they become targets for unauthorized access. {% data variables.product.prodname_secret_scanning_caps %} automatically detects credential leaks so you can secure them before they're exploited.
2323

2424
{% ifversion secret-risk-assessment %}
2525

@@ -32,15 +32,15 @@ When credentials like API keys and passwords are committed to repositories, they
3232

3333
## How secret scanning protects your code
3434

35-
{% data variables.product.prodname_secret_scanning_caps %} scans your entire Git history on all branches of your repository for API keys, passwords, tokens, and other known secret types. {% data variables.product.github %} also periodically rescans repositories when new secret types are added.
35+
{% data variables.product.prodname_secret_scanning_caps %} scans your entire Git history on all branches of your repository for hardcoded credentials, including API keys, passwords, tokens, and other known secret types. This helps you identify secret sprawl, the uncontrolled proliferation of credentials across repositories, before it becomes a security risk. {% data variables.product.github %} also periodically rescans repositories when new secret types are added.
3636

3737
{% data variables.product.github %} also automatically scans:
3838

3939
{% data reusables.secret-scanning.what-is-scanned %}
4040

4141
### {% data variables.product.prodname_secret_scanning_caps %} alerts and remediation
4242

43-
When {% data variables.product.prodname_secret_scanning %} finds a potential secret, {% data variables.product.github %} generates an alert on your repository's **{% data variables.product.prodname_security_and_quality_tab %}** tab with details about the exposed credential.
43+
When {% data variables.product.prodname_secret_scanning %} detects a credential leak, {% data variables.product.github %} generates an alert on your repository's **{% data variables.product.prodname_security_and_quality_tab %}** tab with details about the exposed credential.
4444

4545
When you receive an alert, rotate the affected credential immediately to prevent unauthorized access. While you can also remove secrets from your Git history, this is time-intensive and often unnecessary if you've already revoked the credential.
4646

content/code-security/concepts/secret-security/about-secret-security-with-github.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ category:
1414
- Protect your secrets
1515
---
1616

17-
Exposed secrets in your repositories can lead to unauthorized access, data breaches, and significant costs to your organization. For details about these risks and how to protect against them, see [AUTOTITLE](/code-security/concepts/secret-security/secret-leakage-risks).
17+
Hardcoded credentials in your repositories can lead to credential leaks, unauthorized access, data breaches, and significant costs to your organization. For details about these risks and how to protect against them, see [AUTOTITLE](/code-security/concepts/secret-security/secret-leakage-risks).
1818

1919
{% data variables.product.github %} provides tools to help you understand and address your organization's exposure to leaked secrets:
2020

@@ -23,7 +23,7 @@ Exposed secrets in your repositories can lead to unauthorized access, data breac
2323

2424
## Secret risk assessment
2525

26-
The secret risk assessment provides organization owners and security managers with a free point-in-time scan of their organization's repositories to identify leaked secrets like API keys, tokens, and passwords.
26+
The secret risk assessment provides organization owners and security managers with a free point-in-time scan of their organization's repositories to identify hardcoded credentials like API keys, tokens, and passwords, and understand the extent of secret sprawl across your organization.
2727

2828
{% data variables.secret-scanning.secret-risk-assessment-cta-product %}
2929

@@ -52,13 +52,13 @@ Regular assessment helps prevent:
5252
While the {% data variables.product.prodname_secret_risk_assessment %} provides a point-in-time view of your organization's current secret exposure, {% data variables.product.prodname_GH_secret_protection %}:
5353

5454
* **Implements continuous monitoring** and expands scanned surfaces beyond code to include pull requests, issues, wikis, and discussions
55-
* **Prevents secret leaks** by blocking commits containing secrets before they are saved to {% data variables.product.github %}
55+
* **Prevents credential leaks** by blocking commits containing hardcoded secrets before they are saved to {% data variables.product.github %}
5656
* **Creates actionable alerts** that can be grouped into campaigns and assigned to team members for remediation
5757
* **Meets your specific needs** by scanning for patterns unique to your organization and unstructured secrets like passwords
5858
* **Supports governance at scale** with settings dictating who can bypass protections and dismiss alerts
5959
* **Surfaces key analytics** through a view dedicated to your organization's secret security
6060

61-
Through these features, {% data variables.product.prodname_GH_secret_protection %} provides complete coverage for your organization, reducing the risk of costly secret leaks and high-effort remediation processes.
61+
Through these features, {% data variables.product.prodname_GH_secret_protection %} provides complete coverage for your organization, reducing the risk of costly credential leaks, secret sprawl, and high-effort remediation.
6262

6363
For more information about the specific features of {% data variables.product.prodname_GH_secret_protection %}, see [AUTOTITLE](/code-security/getting-started/github-security-features#available-with-github-secret-protection).
6464

content/code-security/concepts/secret-security/secret-leakage-risks.md

Lines changed: 51 additions & 57 deletions
Original file line numberDiff line numberDiff line change
@@ -9,96 +9,90 @@ versions:
99
contentType: concepts
1010
---
1111

12-
## Secrets and credentials
12+
## What are secrets?
1313

14-
Secrets are credentials that grant access to sensitive systems and data, including API keys, passwords, authentication tokens, certificates, and encryption keys. When secrets are committed to repositories, they become part of your Git history and remain accessible even after being removed from the latest commit.
14+
Secrets are credentials that grant access to sensitive systems and data. Common examples include:
1515

16-
Secrets in code repositories can be discovered by automated scanning tools and unauthorized users. Public repositories are particularly vulnerable, but leaked credentials from private repositories can also spread through forks, CI/CD logs, or third-party integrations.
16+
* API keys and tokens used to authenticate with external services
17+
* Database passwords and connection strings
18+
* Cloud provider credentials and service account tokens
19+
* Certificates and encryption keys
1720

18-
## Security impact of exposed secrets
21+
When secrets are committed to repositories, they become **hardcoded credentials** that are embedded directly in your source code or configuration files. These hardcoded secrets become part of your Git history and remain accessible even after being removed from the latest commit. This means that addressing a credential leak requires more than deleting the file; you must also revoke and replace the credential to prevent unauthorized access.
1922

20-
Exposed secrets can lead to several types of security incidents:
23+
## How secrets get exposed
2124

22-
**Unauthorized access and usage**
23-
* Leaked cloud provider credentials can be used to provision infrastructure or services on your account
24-
* Database credentials allow access to sensitive customer or organizational data
25-
* Service account tokens provide entry points to production systems
25+
**Secret sprawl** occurs when credentials proliferate across repositories, teams, and systems without centralized management or visibility. This makes it difficult to track which secrets exist, where they're used, and whether they've been exposed. Secrets typically enter repositories through several common patterns.
2626

27-
**Operational and compliance issues**
28-
* Infrastructure can be modified or deleted using leaked credentials
29-
* Data breaches from exposed secrets may result in regulatory penalties under GDPR, CCPA, and other frameworks
30-
* Organizations face costs for incident response, credential rotation, and system remediation
27+
### Development workflows
3128

32-
**Organizational risk**
33-
* Public disclosure of leaked secrets affects customer trust and organizational reputation
34-
* Exposed package registry tokens can be used to publish malicious versions of your software
35-
* Proprietary API keys or service credentials may be exploited
29+
* Hardcoded credentials added during local testing and inadvertently committed
30+
* Secrets in configuration files such as `.env` files or infrastructure-as-code templates
31+
* Example credentials containing real API keys or tokens in documentation, wikis, or README files
3632

37-
## Financial impact of exposed secrets
33+
### Repository management
3834

39-
Secret leakage can result in direct and indirect costs to your organization, ranging from immediate expenses to long-term business consequences.
35+
* Legacy repositories containing forgotten but still-active credentials
36+
* Secrets shared in {% data variables.product.github %} issues, pull request comments, discussions, or gists
37+
* Credentials introduced by external contributors or contractors
4038

41-
**Immediate costs**
42-
* Unauthorized cloud resource usage from leaked API keys can generate charges for compute instances, storage, or data transfer
43-
* Cryptocurrency mining operations on compromised accounts can result in substantial infrastructure bills
44-
* Emergency incident response requires resources for forensic investigation, security audits, and credential rotation across systems
39+
### Version control propagation
4540

46-
**Data breach costs**
47-
* Regulatory fines for data protection violations can reach millions of dollars under GDPR, CCPA, and industry-specific regulations
48-
* Legal costs include investigation, notification requirements, and potential litigation
49-
* Credit monitoring and identity protection services for affected customers
41+
* Secrets persist in Git history even after removal from current code.
42+
* Credentials propagate to forked repositories, backup systems, and CI/CD logs.
43+
* Public repositories with exposed secrets are indexed by search engines and specialized scanning services.
5044

51-
**Operational impact**
52-
* Service disruptions from compromised infrastructure result in lost revenue and productivity
53-
* Engineering time spent responding to security incidents diverts resources from product development
54-
* Increased security tooling and monitoring costs following incidents
45+
## Security risks
5546

56-
**Long-term business impact**
57-
* Customer churn following public disclosure of security incidents
58-
* Increased insurance premiums for cyber liability coverage
59-
* Lost business opportunities due to failed security assessments or compliance audits
47+
Exposed secrets can lead to several types of security incidents.
6048

61-
## Common secret leakage scenarios
49+
### Unauthorized access
6250

63-
Secrets typically enter repositories through several common patterns:
51+
Credential leaks give unauthorized users direct access to your systems. Once exposed, hardcoded secrets can be exploited to:
6452

65-
**Development workflows**
66-
* Credentials hardcoded during local testing and inadvertently committed
67-
* Secrets in configuration files like `.env` files or infrastructure-as-code templates
68-
* Example credentials containing real tokens in documentation, wikis, or README files
53+
* Provision infrastructure or services on your account using leaked cloud provider credentials
54+
* Access sensitive customer or organizational data through compromised database credentials
55+
* Gain entry to production systems via exposed service account tokens
6956

70-
**Repository management**
71-
* Legacy repositories containing forgotten but still-active credentials
72-
* Secrets shared in GitHub issues, pull request comments, discussions, or gists
73-
* Credentials introduced by external contributors or contractors
57+
### Data breaches
58+
59+
Credential leaks give unauthorized users direct access to your systems, leading to data breaches. Once attackers gain access using exposed credentials, they can exfiltrate sensitive data, modify or delete critical information, and compromise customer trust. Data breaches require immediate incident response, including credential revocation, system remediation, and assessment of the breach's scope and impact.
7460

75-
**Version control challenges**
76-
* Secrets persist in Git history even after removal from current code
77-
* Credentials propagate to forked repositories, backup systems, and logs
78-
* Public repositories with exposed secrets are indexed by search engines and specialized scanning services
61+
### Supply chain attacks
62+
63+
Exposed package registry tokens can be used to publish malicious versions of your software, affecting downstream users and organizations that depend on your packages.
64+
65+
## Financial impact
66+
67+
Exposed secrets can cost your organization money in several ways.
68+
69+
* **Unexpected cloud bills**: Leaked API keys let attackers use your cloud resources. They can run compute instances, store data, or mine cryptocurrency on your account, generating large bills.
70+
* **Incident response**: Investigating breaches, rotating credentials, and auditing systems takes significant engineering time and resources.
71+
* **Legal costs**: Data breaches can result in fines, legal fees, and notification expenses.
72+
* **Long-term damage**: Lost customers, higher insurance costs, and missed business opportunities after security incidents become public.
7973

8074
## Secret security with {% data variables.product.github %}
8175

8276
{% data variables.product.github %} provides tools to help you prevent, detect, and remediate secret leakage:
8377

84-
### 1. Prevent new secrets from being leaked
78+
### 1. Prevent new secrets from being committed
8579

86-
Enable **push protection for repositories** to scan code during `git push` operations and block commits containing detected secrets. This prevents credentials from entering your repositories while providing real-time feedback to developers.
80+
Enable **Push protection** to scan code during `git push` operations and block commits containing detected secrets before they enter your repository. This prevents hardcoded credentials from being added to your codebase and provides real-time feedback to developers at the point of risk, covering both provider patterns for known services and non-provider patterns such as private keys and generic API keys.
8781

88-
Encourage your contributors to enable push protection for their personal accounts (the feature is referred to as "push protection for users") to protect all their pushes to their repositories, forks, and any repositories they contribute to across {% data variables.product.github %}. This allows individual developers to prevent secret leakage without waiting for organization-level policies.
82+
Encourage individual developers to enable push protection for their personal accounts to protect all their pushes across {% data variables.product.github %}, regardless of organization policies. This helps prevent secret sprawl by catching leaked credentials before they reach your repositories.
8983

9084
### 2. Detect existing secrets
9185

92-
Use **{% data variables.product.prodname_secret_scanning %}** to continuously monitor repositories for committed secrets and receive alerts when credentials are detected. This enables you to revoke and rotate compromised credentials quickly.
86+
Use **{% data variables.product.prodname_secret_scanning %}** to continuously monitor your repositories for hardcoded secrets and generate alerts when credentials are detected, enabling you to revoke and rotate compromised credentials quickly. Beyond default detection of provider patterns, you can expand scanning to non-provider patterns and define custom patterns for organization-specific secrets. This helps you gain visibility into secret sprawl across your organization.
9387

9488
## Next steps
9589

96-
To protect your organization from secret leakage:{% ifversion secret-risk-assessment %}
97-
1. Run a free secret risk assessment to understand your current exposure.
98-
{% data variables.secret-scanning.secret-risk-assessment-cta-product %}
90+
To protect your organization from secret leakage:
91+
{% ifversion secret-risk-assessment %}
92+
1. Run a free secret risk assessment to understand your current exposure. {% data variables.secret-scanning.secret-risk-assessment-cta-product %}
9993
{% endif %}
10094
1. Enable push protection to prevent new secrets from being committed.
101-
1. Enable {% data variables.product.prodname_secret_scanning %} with a click to begin detecting secret leaks.
95+
1. Enable {% data variables.product.prodname_secret_scanning %} to begin detecting existing secret leaks.
10296
1. Establish secure credential management practices for your development teams.
10397

10498
{% ifversion secret-risk-assessment %}

0 commit comments

Comments
 (0)