Skip to content

Commit 1cd39ca

Browse files
chore: sync security config files (#470)
## Summary This PR syncs security scanning configuration files from the central [security-config](https://github.com/opendatahub-io/security-config) repository, managed by the [@opendatahub-io/odh-platform-security](https://github.com/orgs/opendatahub-io/teams/odh-platform-security) team. ## Files | File | Status | |------|--------| | `semgrep.yaml` | Added | | `.gitleaksignore` | Added | | `.gitleaks.toml` | Added | ## What does this mean for your team? - **No action required from reviewers** beyond merging this PR - These files are **protected by an org-level push ruleset** — they cannot be modified directly in this repo - Future updates will be synced automatically via PRs from the `security-config` repo - CodeRabbit and Semgrep will use these configs when reviewing PRs on this repo For questions or customization requests, open an issue on [opendatahub-io/security-config](https://github.com/opendatahub-io/security-config). --------- Co-authored-by: security-config-sync[bot] <265242129+security-config-sync[bot]@users.noreply.github.com>
1 parent e85a928 commit 1cd39ca

3 files changed

Lines changed: 1945 additions & 0 deletions

File tree

.gitleaks.toml

Lines changed: 67 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
1+
# Gitleaks configuration for opendatahub-io repos
2+
# Synced from security-config. Do not edit in target repos.
3+
#
4+
# Path allowlists use Go regex syntax.
5+
# Real credentials should NEVER be committed to any repository.
6+
7+
[extend]
8+
useDefault = true
9+
10+
[allowlist]
11+
description = "Exclude test fixtures, mock data, sample configs, and CI resources"
12+
paths = [
13+
# Go test files (commonly contain mock credentials)
14+
'''.*_test\.go$''',
15+
16+
# JS/TS test files (.spec.ts, .test.tsx, etc.)
17+
'''.*\.spec\.(ts|tsx|js|jsx)$''',
18+
'''.*\.test\.(ts|tsx|js|jsx)$''',
19+
20+
# JS/TS test directories
21+
'''__tests__/''',
22+
23+
# Go testdata directories
24+
'''testdata/''',
25+
26+
# Python test data directories
27+
'''test_data/''',
28+
29+
# Test fixtures
30+
'''fixtures/''',
31+
32+
# JavaScript/TypeScript mocks
33+
'''__mocks__/''',
34+
35+
# Go/Java/TS mock directories
36+
'''mocks/''',
37+
'''k8mocks/''',
38+
39+
# Sample and example configs with placeholder credentials
40+
'''docs/samples/''',
41+
'''config/samples/''',
42+
'''config/overlays/test/''',
43+
44+
# CI/GitHub Actions test resources
45+
'''\.github/resources/''',
46+
47+
# E2E test credentials
48+
'''test/e2e/credentials/''',
49+
'''tests/e2e/credentials/''',
50+
51+
# OpenShift CI sample resources
52+
'''openshift-ci/resources/samples/''',
53+
54+
# Cypress test data
55+
'''cypress/fixtures/''',
56+
'''cypress/tests/mocked/''',
57+
58+
# Test certificate and key files
59+
'''tests/data/.*\.(pem|crt|key)$''',
60+
]
61+
62+
# Known test/placeholder credentials used in documentation and tests
63+
regexes = [
64+
'''database-password\s*:\s*"?(The)?BlurstOfTimes"?''',
65+
'''database-user\s*:\s*"?mlmduser"?''',
66+
'''database-user\s*:\s*"?modelregistryuser"?''',
67+
]

.gitleaksignore

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# Gitleaks ignore file
2+
# Add false positive fingerprints below (one per line)
3+
# Format: commit:file:rule-id:line or file:rule-id:line
4+
#
5+
# For path-based exclusions, use .gitleaks.toml allowlist instead.

0 commit comments

Comments
 (0)