ci: fix gitleaks (first push) + desabilitar CodeQL em repo private

This commit is contained in:
Jesse Freitas 2026-04-24 08:36:46 -03:00
parent d60d3f6dcb
commit 970d8dabd8

View file

@ -47,22 +47,27 @@ jobs:
- uses: actions/checkout@v4 - uses: actions/checkout@v4
with: with:
fetch-depth: 0 fetch-depth: 0
- name: Run gitleaks - name: Install gitleaks CLI
uses: gitleaks/gitleaks-action@v2 run: |
env: GL_VERSION=8.24.3
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} curl -sSL -o /tmp/gitleaks.tar.gz \
"https://github.com/zricethezav/gitleaks/releases/download/v${GL_VERSION}/gitleaks_${GL_VERSION}_linux_x64.tar.gz"
tar -xzf /tmp/gitleaks.tar.gz -C /tmp
sudo mv /tmp/gitleaks /usr/local/bin/gitleaks
- name: Scan full repository
run: gitleaks detect --source . --redact --verbose --exit-code 1
codeql: # CodeQL: desabilitado em repo private sem GitHub Advanced Security addon.
name: CodeQL # Reativar quando repo tornar-se público ou GHAS for contratado.
runs-on: ubuntu-latest # codeql:
permissions: # name: CodeQL
security-events: write # runs-on: ubuntu-latest
steps: # permissions: { security-events: write }
- uses: actions/checkout@v4 # steps:
- uses: github/codeql-action/init@v3 # - uses: actions/checkout@v4
with: # - uses: github/codeql-action/init@v3
languages: javascript, python # with: { languages: javascript, python }
- uses: github/codeql-action/analyze@v3 # - uses: github/codeql-action/analyze@v3
bench: bench:
name: Benchmark (informational) name: Benchmark (informational)