From 1e848c9314882fd5b6d4407e837bd4369a0d47d7 Mon Sep 17 00:00:00 2001 From: ruzell22 Date: Fri, 10 Mar 2023 10:42:54 +0800 Subject: [PATCH] refactor(cmd-api-server): clean up configuration parameters gitguardian scanner test test Signed-off-by: ruzell22 --- .gitguardian.yaml | 9 +-------- .github/workflows/gg-shield-action.yaml | 12 ++++-------- 2 files changed, 5 insertions(+), 16 deletions(-) diff --git a/.gitguardian.yaml b/.gitguardian.yaml index b85f199ed0..c418cc9071 100644 --- a/.gitguardian.yaml +++ b/.gitguardian.yaml @@ -2,7 +2,7 @@ version: 2 # Set to true if the desired exit code for the CLI is always 0, # otherwise the exit code will be 1 if incidents are found -# the environment variable GITGUARDIAN_EXIT_ZERO=true can also be used toggle this behaviour. +# the environment variable GITGUARDIAN_EXIT_ZERO=true can also be used toggle this behavior. exit-zero: false # default: false verbose: false # default: false @@ -25,13 +25,6 @@ secret: - 'LICENSE' - '**/examples/cactus-example-carbon-accounting-backend/example-config.json' - # Ignore security incidents with the SHA256 of the occurrence obtained at output or the secret itself - # ignored-matches: - # - name: - # match: 530e5a4a7ea00814db8845dd0cae5efaa4b974a3ce1c76d0384ba715248a5dc1 - # - name: credentials - # match: MY_TEST_CREDENTIAL - # Detectors to ignore. ignored-detectors: # default: [] - Generic Password \ No newline at end of file diff --git a/.github/workflows/gg-shield-action.yaml b/.github/workflows/gg-shield-action.yaml index 07d8b65c8c..200e91e991 100644 --- a/.github/workflows/gg-shield-action.yaml +++ b/.github/workflows/gg-shield-action.yaml @@ -2,11 +2,10 @@ name: GitGuardian scan on: push: - pull_request: + pull_request_target: # Publish `main` as Docker `latest` image. branches: - main - - haruharu720test # Publish `v1.2.3` tags as releases. tags: @@ -23,16 +22,13 @@ jobs: fetch-depth: 0 # fetch all history so multiple commits can be scanned env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - # - name: Login to DockerHub Registry - # run: echo "${{ secrets.GITHUB_TOKEN }}" | docker login ghcr.io -u ${{ github.actor }} --password-stdin - name: GitGuardian scan - uses: GitGuardian/ggshield-action@v1.1.0 + uses: GitGuardian/ggshield-action@v1.14.4 with: args: --show-secrets --exit-zero --all-policies --verbose 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: haruharu720test - # GITGUARDIAN_API_KEY: ${{ secrets.GITGUARDIAN_API_KEY }} - # GITGUARDIAN_INSTANCE: 'https://api.gitguardian.com/' \ No newline at end of file + GITHUB_DEFAULT_BRANCH: main + GITGUARDIAN_API_KEY: ${{ secrets.GITGUARDIAN_API_KEY }} \ No newline at end of file