Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions .github/workflows/semgrep-self-test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
name: Semgrep Self-Test

on:
pull_request:
paths:
- '.github/workflows/semgrep.yml'
- '.github/workflows/semgrep-self-test.yml'
workflow_dispatch:

jobs:
scan:
uses: ./.github/workflows/semgrep.yml
secrets: inherit
15 changes: 7 additions & 8 deletions .github/workflows/semgrep.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,14 +19,13 @@ jobs:
runs-on: ubuntu-latest
timeout-minutes: 20
container:
image: semgrep/semgrep
# Anonymous Docker Hub pulls share the caller's runner IP rate limit and
# have been failing this job at Initialize containers in multiple repos.
# In a reusable workflow these resolve from the caller's repo (with
# secrets: inherit); when unset the runner falls back to an anonymous pull.
credentials:
username: ${{ vars.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
# Pull through Google's unauthenticated Docker Hub mirror. Anonymous
# Docker Hub pulls share the caller's runner IP rate limit and fail at
# Initialize containers. Do not add a credentials block: callers that
# don't define the referenced vars/secrets resolve to an empty value,
# which makes the runner reject the whole template ("Unexpected value
# ''", actions/runner#4204) for every consumer of this workflow.
image: mirror.gcr.io/semgrep/semgrep
outputs:
findings_count: ${{ steps.count.outputs.findings_count }}
steps:
Expand Down
Loading