mirror of
https://github.com/pewdiepie-archdaemon/odysseus.git
synced 2026-06-16 09:45:24 -04:00
3c0e9fcb25
Bumps the actions group with 4 updates: [actions/checkout](https://github.com/actions/checkout), [actions/setup-python](https://github.com/actions/setup-python), [actions/setup-node](https://github.com/actions/setup-node) and [github/codeql-action](https://github.com/github/codeql-action). Updates `actions/checkout` from 4.3.1 to 6.0.3 - [Release notes](https://github.com/actions/checkout/releases) - [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md) - [Commits](https://github.com/actions/checkout/compare/v4.3.1...df4cb1c069e1874edd31b4311f1884172cec0e10) Updates `actions/setup-python` from 5.6.0 to 6.2.0 - [Release notes](https://github.com/actions/setup-python/releases) - [Commits](https://github.com/actions/setup-python/compare/v5.6.0...a309ff8b426b58ec0e2a45f0f869d46889d02405) Updates `actions/setup-node` from 4.4.0 to 6.4.0 - [Release notes](https://github.com/actions/setup-node/releases) - [Commits](https://github.com/actions/setup-node/compare/49933ea5288caeca8642d1e84afbd3f7d6820020...48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e) Updates `github/codeql-action` from 3.36.0 to 4.36.2 - [Release notes](https://github.com/github/codeql-action/releases) - [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md) - [Commits](https://github.com/github/codeql-action/compare/03e4368ac7daa2bd82b3e85262f3bf87ee112f57...8aad20d150bbac5944a9f9d289da16a4b0d87c1e) --- updated-dependencies: - dependency-name: actions/checkout dependency-version: 6.0.3 dependency-type: direct:production update-type: version-update:semver-major dependency-group: actions - dependency-name: actions/setup-python dependency-version: 6.2.0 dependency-type: direct:production update-type: version-update:semver-major dependency-group: actions - dependency-name: actions/setup-node dependency-version: 6.4.0 dependency-type: direct:production update-type: version-update:semver-major dependency-group: actions - dependency-name: github/codeql-action dependency-version: 4.36.2 dependency-type: direct:production update-type: version-update:semver-major dependency-group: actions ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
61 lines
2.4 KiB
YAML
61 lines
2.4 KiB
YAML
# Secret scanning
|
|
#
|
|
# Purpose: stop credentials (API keys, tokens, passwords, private keys) from
|
|
# ever living in the Git history. Odysseus deliberately keeps real secrets in
|
|
# files that are gitignored (.env, data/), but a slip in a future commit -- or a
|
|
# malicious pull request that sneaks one in -- would otherwise go unnoticed.
|
|
# This job reads the repository and the full commit history and fails if it
|
|
# finds anything that looks like a secret.
|
|
#
|
|
# It runs the official gitleaks BINARY directly (pinned to an exact version and
|
|
# verified against the project's published SHA-256 checksum) rather than the
|
|
# gitleaks GitHub Action, because the Action asks for a paid license on
|
|
# organization-owned repos. The binary is free and behaves identically.
|
|
|
|
name: Secret scan
|
|
|
|
on:
|
|
pull_request:
|
|
push:
|
|
branches: [main]
|
|
workflow_dispatch:
|
|
|
|
# Start with zero permissions; the single job opts back in to read-only.
|
|
permissions: {}
|
|
|
|
concurrency:
|
|
group: secret-scan-${{ github.workflow }}-${{ github.ref }}
|
|
cancel-in-progress: true
|
|
|
|
jobs:
|
|
gitleaks:
|
|
name: gitleaks
|
|
runs-on: ubuntu-latest
|
|
permissions:
|
|
contents: read
|
|
steps:
|
|
- name: Checkout repository
|
|
uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
|
|
with:
|
|
# Full history so a secret committed in an earlier commit (and later
|
|
# deleted) is still caught -- deletion does not remove it from Git.
|
|
fetch-depth: 0
|
|
persist-credentials: false
|
|
|
|
# Pinned version + checksum so a tampered release binary cannot run here.
|
|
# Bump VERSION/SHA256 together; the checksum comes from the matching
|
|
# gitleaks_<version>_checksums.txt on the GitHub release.
|
|
- name: Run gitleaks (pinned, checksum-verified)
|
|
env:
|
|
GITLEAKS_VERSION: 8.30.1
|
|
GITLEAKS_SHA256: 551f6fc83ea457d62a0d98237cbad105af8d557003051f41f3e7ca7b3f2470eb
|
|
run: |
|
|
set -euo pipefail
|
|
TARBALL="gitleaks_${GITLEAKS_VERSION}_linux_x64.tar.gz"
|
|
curl -fsSL -o "${TARBALL}" \
|
|
"https://github.com/gitleaks/gitleaks/releases/download/v${GITLEAKS_VERSION}/${TARBALL}"
|
|
echo "${GITLEAKS_SHA256} ${TARBALL}" | sha256sum -c -
|
|
tar -xzf "${TARBALL}" gitleaks
|
|
# Scan the whole history. Findings print to the log and fail the job.
|
|
./gitleaks git --no-banner --redact --verbose .
|