Merge pull request #62 from amazon-contributing/git-actions-oicd #127
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Scan for leaked secrets | |
on: | |
push: | |
branches: [ to-be-upstreamed, dsql ] | |
tags: | |
- 'v*' | |
pull_request: | |
branches: [ to-be-upstreamed, dsql ] | |
jobs: | |
test: | |
runs-on: ubuntu-latest | |
permissions: | |
id-token: write | |
contents: read | |
# Explicitly set permissions, following the principle of least privilege | |
actions: read | |
checks: write | |
pull-requests: write | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v3 | |
with: | |
# For pull requests, check out the base branch, not the PR branch | |
ref: ${{ github.event.pull_request.base.sha }} | |
- name: gitleaks | |
uses: gitleaks/gitleaks-action@v1.6.0 | |
env: | |
# GitHub Token automatically created on run | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |