diff --git a/.circleci/config.yml b/.circleci/config.yml deleted file mode 100644 index e69de29..0000000 diff --git a/.github/dependabot.yml b/.github/dependabot.yml new file mode 100644 index 0000000..5380bc2 --- /dev/null +++ b/.github/dependabot.yml @@ -0,0 +1,15 @@ +version: 2 +updates: + - package-ecosystem: "pip" + directory: "/" + schedule: + interval: "weekly" + open-pull-requests-limit: 5 + groups: + security: + applies-to: security-updates + patterns: ["*"] + - package-ecosystem: "github-actions" + directory: "/" + schedule: + interval: "weekly" diff --git a/.github/workflows/codeql.yml b/.github/workflows/codeql.yml new file mode 100644 index 0000000..953aded --- /dev/null +++ b/.github/workflows/codeql.yml @@ -0,0 +1,40 @@ +name: CodeQL + +on: + pull_request: + branches: [master, main] + push: + branches: [master, main] + +concurrency: + group: codeql-${{ github.ref }} + cancel-in-progress: true + +permissions: + contents: read + +jobs: + analyze: + runs-on: ubuntu-latest + permissions: + actions: read + contents: read + security-events: write + strategy: + fail-fast: false + matrix: + language: [python, actions] + steps: + - uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4.4.0 + with: + persist-credentials: false + - uses: github/codeql-action/init@6f2ac81f5cd81fe351a197ba0b00d91d03cd2aee # v4.39.0 + with: + languages: ${{ matrix.language }} + build-mode: none + # Code scanning needs Code Security on a private repo, which this one does not have, + # so results are uploaded only once the repo is public. + - uses: github/codeql-action/analyze@6f2ac81f5cd81fe351a197ba0b00d91d03cd2aee # v4.39.0 + with: + category: /language:${{ matrix.language }} + upload: ${{ github.event.repository.private && 'never' || 'always' }} diff --git a/.github/workflows/opengrep-ci.yml b/.github/workflows/opengrep-ci.yml deleted file mode 100644 index 92cb7da..0000000 --- a/.github/workflows/opengrep-ci.yml +++ /dev/null @@ -1,18 +0,0 @@ -name: OpenGrep - -on: - pull_request: {} - -concurrency: - group: opengrep-${{ github.event.pull_request.number }} - cancel-in-progress: true - -permissions: - contents: read - pull-requests: write - id-token: write - -jobs: - opengrep: - uses: scaleapi/required-actions/.github/workflows/opengrep-ci.yml@opengrep-4core-runner - secrets: inherit diff --git a/.github/workflows/opengrep-fp.yml b/.github/workflows/opengrep-fp.yml deleted file mode 100644 index 5693b44..0000000 --- a/.github/workflows/opengrep-fp.yml +++ /dev/null @@ -1,18 +0,0 @@ -name: OpenGrep FP Triage - -on: - pull_request_review_comment: - types: [created] - -permissions: - pull-requests: write - id-token: write - -jobs: - triage: - if: | - (startsWith(github.event.comment.body, '/fp') || - startsWith(github.event.comment.body, '/FP')) && - !endsWith(github.actor, '[bot]') - uses: scaleapi/required-actions/.github/workflows/opengrep-fp.yml@main - secrets: inherit diff --git a/.github/workflows/trufflehog-bypass.yml b/.github/workflows/trufflehog-bypass.yml deleted file mode 100644 index 51bdc8d..0000000 --- a/.github/workflows/trufflehog-bypass.yml +++ /dev/null @@ -1,16 +0,0 @@ -name: TruffleHog Bypass Handler - -on: - issue_comment: - types: [created] - -jobs: - bypass: - if: | - github.event.issue.pull_request && - contains(github.event.comment.body, '/trufflehog-bypass') - uses: scaleapi/required-actions/.github/workflows/trufflehog-bypass-handler.yml@main - permissions: - pull-requests: write - contents: read - actions: write diff --git a/.github/workflows/trufflehog-ci.yml b/.github/workflows/trufflehog-ci.yml index 39d4a30..598a3eb 100644 --- a/.github/workflows/trufflehog-ci.yml +++ b/.github/workflows/trufflehog-ci.yml @@ -4,10 +4,19 @@ on: pull_request: branches: [master, main] +permissions: + contents: read + jobs: scan: - uses: scaleapi/required-actions/.github/workflows/trufflehog-scan.yml@main - permissions: - contents: read - pull-requests: write - id-token: write + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4.4.0 + with: + fetch-depth: 0 + persist-credentials: false + # Scans the commits between the PR's base and head. + - uses: trufflesecurity/trufflehog@31ce31ee1abbcc7dc8eee5764c17121c3044c8b2 # v3.99.7 + with: + version: 3.99.7 + extra_args: --results=verified,unknown diff --git a/.github/workflows/trufflehog-weekly.yml b/.github/workflows/trufflehog-weekly.yml index f2efa60..fc1eb14 100644 --- a/.github/workflows/trufflehog-weekly.yml +++ b/.github/workflows/trufflehog-weekly.yml @@ -4,23 +4,20 @@ on: schedule: - cron: '0 3 * * 0' workflow_dispatch: - inputs: - since_commit: - description: 'Override: Scan from this commit SHA (leave empty to use stored value)' - required: false - type: string - full_scan: - description: 'Run full history scan (ignores since_commit)' - required: false - type: boolean - default: false + +permissions: + contents: read jobs: scan: - uses: scaleapi/required-actions/.github/workflows/trufflehog-weekly-scan.yml@main - with: - since_commit: ${{ inputs.since_commit || '' }} - full_scan: ${{ inputs.full_scan || false }} - permissions: - contents: read - id-token: write + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4.4.0 + with: + fetch-depth: 0 + persist-credentials: false + # On schedule and workflow_dispatch the action scans the full history. + - uses: trufflesecurity/trufflehog@31ce31ee1abbcc7dc8eee5764c17121c3044c8b2 # v3.99.7 + with: + version: 3.99.7 + extra_args: --results=verified,unknown