diff --git a/.github/workflows/gitleaks.yml b/.github/workflows/gitleaks.yml new file mode 100644 index 0000000000..97b1b2e9e1 --- /dev/null +++ b/.github/workflows/gitleaks.yml @@ -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 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/mock-secret.txt b/mock-secret.txt new file mode 100644 index 0000000000..d3c145139f --- /dev/null +++ b/mock-secret.txt @@ -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