From 5db1b3a8d8196505ce93d17b520d70f46f6d3d49 Mon Sep 17 00:00:00 2001 From: Gonzalo Diaz Date: Wed, 23 Oct 2024 16:47:47 -0300 Subject: [PATCH] [CONFIG] [Github Actions] Avoid run on "push" for dependabot triggered actions. Workflows triggered by Dependabot on the "push" event run with read-only access. Uploading Code Scanning results requires write access. To use Code Scanning with Dependabot, please ensure you are using the "pull_request" event for this workflow and avoid triggering on the "push" event for Dependabot branches. See https://docs.github.com/en/code-security/code-scanning/creating-an-advanced-setup-for-code-scanning/customizing-your-advanced-setup-for-code-scanning#scanning-on-push for more information on how to configure these events. https://stackoverflow.com/a/57903434/6366150 --- .github/workflows/snyk-code.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/snyk-code.yml b/.github/workflows/snyk-code.yml index 9699375..bd4d53f 100644 --- a/.github/workflows/snyk-code.yml +++ b/.github/workflows/snyk-code.yml @@ -4,6 +4,9 @@ name: Snyk Code (Golang) on: # yamllint disable-line rule:truthy push: + branches: + - '**' # matches every branch + - '!dependabot/**' # excludes master pull_request: workflow_dispatch: