Skip to content

Commit f14743b

Browse files
Sync from inner source [auto] (#59)
Sync from github/github-well-architected-internal (main) Source Repository: github/github-well-architected-internal Source Branch: main Source SHA: 35446b317011eea563e262313eb5e6abd3e2d738 Co-authored-by: well-architected-sync-bot[bot] <235114805+well-architected-sync-bot[bot]@users.noreply.github.com>
1 parent cf29057 commit f14743b

File tree

3 files changed

+50
-55
lines changed

3 files changed

+50
-55
lines changed

content/library/scenarios/anti-patterns.md

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -251,3 +251,23 @@ Relying on human intervention for deployment.
251251
- Document any remaining manual processes thoroughly.
252252

253253
By organizing anti-patterns into these clear categories and addressing their distinct aspects, teams can more systematically improve their GitHub practices.
254+
255+
## Application Security Anti-Patterns
256+
257+
### Detecting PII with secret scanning custom patterns
258+
259+
Using GitHub secret scanning custom patterns to detect Personally Identifiable Information (PII) such as social security numbers, dates of birth, or government-issued identifiers in source code.
260+
261+
**Why It's an Anti-Pattern**
262+
263+
- Secret scanning is designed for credentials and tokens that can be revoked and rotated. PII such as social security numbers and dates of birth is permanent and cannot be rotated.
264+
- When secret scanning detects a value, the alert stores and displays it so reviewers can assess the finding. Alerts cannot be deleted — only dismissed. Once PII triggers an alert, the sensitive data is permanently embedded in the alert record. This creates a second, unmanageable copy of the very data the organization intended to protect.
265+
- Storing PII in non-deletable alert records creates compliance exposure under frameworks like GDPR (right to erasure), CCPA (right to deletion), HIPAA (disposal requirements), and PCI DSS (secure deletion mandates).
266+
267+
**How to Avoid**
268+
269+
- Keep secret scanning custom patterns focused on their intended purpose: detecting organization-specific credentials, API keys, and tokens that follow the detect-revoke-rotate lifecycle.
270+
- Use purpose-built data loss prevention (DLP) tooling to detect PII in code. DLP tools support redaction, quarantine, and deletion capabilities that align with regulatory requirements.
271+
- Deploy DLP tooling as pre-commit hooks to prevent PII from entering the repository in the first place.
272+
- Audit existing custom patterns for any PII detection rules and remove them. When deleting a custom pattern entirely, the option to delete the existing alerts is provided.
273+
- Document an organizational policy that explicitly defines which tools handle which data types: secret scanning for credentials, DLP tooling for PII.

package-lock.json

Lines changed: 27 additions & 55 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,9 @@
7575
"rehype-sanitize": "^6.0.0",
7676
"remark-gfm": "^4.0.1"
7777
},
78+
"overrides": {
79+
"serialize-javascript": "7.0.3"
80+
},
7881
"jest": {
7982
"roots": [
8083
"<rootDir>/src/js/"

0 commit comments

Comments
 (0)