mirror of
https://github.com/pezkuwichain/pezkuwi-wallet-android.git
synced 2026-10-20 18:56:25 +00:00
ci(security): scan new commits on push/PR and the current tree weekly (#23)
* ci(security): scan new commits on push/PR and the current tree weekly `base: main` made every push to main rescan the whole history, where Nova's own Infura keys are still live, so Secret Scan was red on every push and a new leak would have read as the same old red. - push and pull_request: no `base`, so the action scans only the commits the event brings - schedule: scan a `git archive HEAD` copy of today's tree - pin the action to v3.99.2 by commit and the image to 3.99.2 (was @main and latest) * ci(security): exempt the TruffleHog action from the AGPL licence denial Pinning the action made dependency review evaluate it for the first time. It runs unmodified in CI and is not linked into or shipped with anything.
This commit is contained in:
1 parent
d953058d24
commit
2629cf8da9
1 file changed
+21
-3
@@ -77,6 +77,10 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
fail-on-severity: critical
|
fail-on-severity: critical
|
||||||
deny-licenses: GPL-3.0, AGPL-3.0
|
deny-licenses: GPL-3.0, AGPL-3.0
|
||||||
|
# TruffleHog (AGPL-3.0) is run unmodified as a CI scanner; it is not
|
||||||
|
# linked into or shipped with anything, so the licence's obligations
|
||||||
|
# do not reach this repository. Only this package is exempt.
|
||||||
|
allow-dependencies-licenses: pkg:githubactions/trufflesecurity/trufflehog
|
||||||
|
|
||||||
secret-scan:
|
secret-scan:
|
||||||
name: Secret Scan
|
name: Secret Scan
|
||||||
@@ -88,13 +92,27 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
fetch-depth: 0
|
fetch-depth: 0
|
||||||
|
|
||||||
- name: TruffleHog Secret Scan
|
# Push and pull_request scan only the commits they bring: the action picks
|
||||||
uses: trufflesecurity/trufflehog@main
|
# the range from the event. `base: main` made a push to main rescan the
|
||||||
|
# whole history, where Nova's own Infura keys are still live, so this job
|
||||||
|
# was red on every push and a new leak would have looked like the old red.
|
||||||
|
- name: TruffleHog Secret Scan (new commits)
|
||||||
|
if: github.event_name != 'schedule'
|
||||||
|
uses: trufflesecurity/trufflehog@e76dff8a7e57d6df0c60ad8cbf5d5cba505a8fc9 # v3.99.2
|
||||||
with:
|
with:
|
||||||
path: ./
|
path: ./
|
||||||
base: ${{ github.event.repository.default_branch }}
|
version: 3.99.2
|
||||||
extra_args: --only-verified
|
extra_args: --only-verified
|
||||||
|
|
||||||
|
# The weekly run checks what is in the tree today, not the history.
|
||||||
|
- name: TruffleHog Secret Scan (current tree)
|
||||||
|
if: github.event_name == 'schedule'
|
||||||
|
run: |
|
||||||
|
mkdir -p "$RUNNER_TEMP/tree"
|
||||||
|
git archive HEAD | tar -x -C "$RUNNER_TEMP/tree"
|
||||||
|
docker run --rm -v "$RUNNER_TEMP/tree:/tree" ghcr.io/trufflesecurity/trufflehog:3.99.2 \
|
||||||
|
filesystem /tree --fail --no-update --github-actions --only-verified
|
||||||
|
|
||||||
hardcoded-secrets:
|
hardcoded-secrets:
|
||||||
name: Hardcoded Secret Detection
|
name: Hardcoded Secret Detection
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
|||||||
Reference in new issue
Block a user