From f7c52d0a23e73319407cfa98a2ef140f7f191af8 Mon Sep 17 00:00:00 2001 From: gtkacz Date: Sat, 28 Sep 2024 14:10:59 -0300 Subject: [PATCH] Enabling gitleaks on the repo --- .github/workflows/package_quality.yml | 47 +++++++++++++++++---------- .pre-commit-config.yaml | 4 +++ 2 files changed, 33 insertions(+), 18 deletions(-) diff --git a/.github/workflows/package_quality.yml b/.github/workflows/package_quality.yml index deb9852..20645b1 100644 --- a/.github/workflows/package_quality.yml +++ b/.github/workflows/package_quality.yml @@ -1,5 +1,5 @@ name: Package quality -on: [ push, pull_request ] +on: [push, pull_request] jobs: ruff: runs-on: ubuntu-latest @@ -7,15 +7,15 @@ jobs: - uses: actions/checkout@v4 - uses: chartboost/ruff-action@v1 with: - args: 'format --check' + args: "format --check" #type-completeness: - #runs-on: ubuntu-latest - #steps: - #- uses: Bibo-Joshi/pyright-type-completeness@1.0.0 - #with: - #package-name: 'temporal-adjuster' - #python-version: '3.12' - #pyright-version: '~=1.1.160' + #runs-on: ubuntu-latest + #steps: + #- uses: Bibo-Joshi/pyright-type-completeness@1.0.0 + #with: + #package-name: 'temporal-adjuster' + #python-version: '3.12' + #pyright-version: '~=1.1.160' coverage: runs-on: ubuntu-latest steps: @@ -48,12 +48,23 @@ jobs: args: '--min-confidence 70 --exclude "*/docs/*,setup.py"' security: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@master - - name: Run Snyk to check for vulnerabilities - uses: snyk/actions/node@master - env: - SNYK_TOKEN: ${{ secrets.SNYK_TOKEN }} - with: - command: monitor + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@master + - name: Run Snyk to check for vulnerabilities + uses: snyk/actions/node@master + env: + SNYK_TOKEN: ${{ secrets.SNYK_TOKEN }} + with: + command: monitor + + 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/.pre-commit-config.yaml b/.pre-commit-config.yaml index 4fe2701..a931511 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -20,3 +20,7 @@ repos: - id: ruff args: [ --fix ] - id: ruff-format + - repo: https://github.com/gitleaks/gitleaks + rev: v8.19.3 + hooks: + - id: gitleaks