-
Notifications
You must be signed in to change notification settings - Fork 0
chore: add gitleaks workflow and mock secret for testing #6
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|
| @@ -0,0 +1,19 @@ | ||||||||||
| name: Gitleaks Scan | ||||||||||
|
|
||||||||||
| on: | ||||||||||
| pull_request: | ||||||||||
| branches: | ||||||||||
| - main | ||||||||||
| - dev | ||||||||||
|
|
||||||||||
| jobs: | ||||||||||
| scan: | ||||||||||
| name: gitleaks | ||||||||||
| runs-on: ubuntu-latest | ||||||||||
| steps: | ||||||||||
| - uses: actions/checkout@v4 | ||||||||||
| with: | ||||||||||
| fetch-depth: 0 | ||||||||||
| - uses: gitleaks/gitleaks-action@v2 | ||||||||||
|
||||||||||
| - uses: gitleaks/gitleaks-action@v2 | |
| - uses: gitleaks/gitleaks-action@v2 | |
| with: | |
| args: --config=.gitleaks.toml --gitleaks-ignore-path=.gitleaksignore |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,2 @@ | ||
| # Dòng này cố tình chứa secret giả để test Gitleaks trong quá trình làm đồ án | ||
| ghp_1234567890abcdefghijklmnopqrstuvwxyzabcd |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
With fetch-depth: 0 and no explicit “no-git/diff-only” mode, this is likely to scan full git history on every PR, which can be significantly slower and may surface unrelated historical findings. If the intent is to scan just the working tree for the PR, configure gitleaks accordingly and keep the checkout shallow to reduce runtime.