GitGuardian / ggshield-action

GitGuardian Shield GitHub Action - Find exposed credentials in your commits
MIT License
331 stars 21 forks source link

allow global arguments to be passed #17

Open 0xabdi opened 1 month ago

0xabdi commented 1 month ago

Can the action be updated to allow global options to be passed instead of just allowing options for ggshield secret scan

I am trying to pass the --config-path argument to this action so that I can specify my gitguardian instance URL but it is throwing this error:

Usage: ggshield secret scan [OPTIONS] COMMAND [ARGS]...
Try 'ggshield secret scan -h' for help.
Error: No such option: --config-path

Here is how my action call looks like:

- uses: GitGuardian/ggshield/actions/secret@v1.28.0
        with:
            args: --config-path ./custom_config.yaml
        env:
          GITHUB_PUSH_BEFORE_SHA: ${{ github.event.before }}
          GITHUB_PUSH_BASE_SHA: ${{ github.event.base }}
          GITHUB_PULL_BASE_SHA: ${{ github.event.pull_request.base.sha }}
          GITHUB_DEFAULT_BRANCH: ${{ github.event.repository.default_branch }}
          GITGUARDIAN_API_KEY: ${{ secrets.GITGUARDIAN_API_KEY }}

And here are the contents of the custom_config.yaml file:

version: 2

instance: https://gitguardian.orgname.com