Skip to content

Static Application Security Testing and Leaks using GitLeaks

Notifications You must be signed in to change notification settings

ramshackle-code/sast_gitleaks

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

22 Commits
 
 
 
 

Repository files navigation

sast_gitleaks

Static Application Security Testing using GitLeaks

Call example:

name: LEAKS
on:
  pull_request:
    branches-ignore:
      - main
    paths-ignore:
      - '.github'
jobs:
  sast_gitleaks:
    permissions:                                                                         
      contents: read
    uses: ramshackle-code/sast_gitleaks/.github/workflows/sast_gitleaks.yml@0de5a68b4c898df6928e8913759357d5e95a86a6  #v1.3.1
    secrets:
      token: ${{ secrets.GITHUB_TOKEN }}

Optinal parameters

     uses: ramshackle-code/sast_gitleaks/.github/workflows/sast_gitleaks.yml@[<version-tag> or <commit-sha>]
     with:
       timeout-minutes: <minutes>     #Execution timeout. Default value 5 minutes
       gitleaks-version: <image tag>  #GitLeaks version. Default 8.18.4
       runs-on: <runner label>        #Runner Label. Default 'ubuntu-latest'
       gitleaks-config: <config file> #Gitleaks config file. Default 'cfg/gitleaks.toml'
       fetch-depth: <depth>           #Fetch Depth. Deafult 1 actual commit 0 all commits

Configuration

You need to create config file in cfg path. Please, use this config file as an example.

Exceptions

In order to avoid false positive you can put a file called .gitleaksignore.yml in your repo root folder with the hash, file and line to exclude. Example:

19afb0df830fdeddea7efa323cefddfcc9d27927:docs/tec/tec_blogawsparte1.md:private-key:108

About

Static Application Security Testing and Leaks using GitLeaks

Resources

Code of conduct

Stars

Watchers

Forks

Packages

No packages published