mirror of
https://github.com/trailofbits/buttercup
synced 2026-06-21 14:11:39 +00:00
2ddae66040
Bumps the actions group with 7 updates in the / directory: | Package | From | To | | --- | --- | --- | | [actions/checkout](https://github.com/actions/checkout) | `6.0.2` | `6.0.3` | | [astral-sh/setup-uv](https://github.com/astral-sh/setup-uv) | `8.1.0` | `8.2.0` | | [docker/setup-buildx-action](https://github.com/docker/setup-buildx-action) | `4.0.0` | `4.1.0` | | [docker/login-action](https://github.com/docker/login-action) | `4.1.0` | `4.2.0` | | [docker/metadata-action](https://github.com/docker/metadata-action) | `6.0.0` | `6.1.0` | | [docker/build-push-action](https://github.com/docker/build-push-action) | `7.1.0` | `7.2.0` | | [codecov/codecov-action](https://github.com/codecov/codecov-action) | `6.0.1` | `7.0.0` | Updates `actions/checkout` from 6.0.2 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/de0fac2e4500dabe0009e67214ff5f5447ce83dd...df4cb1c069e1874edd31b4311f1884172cec0e10) Updates `astral-sh/setup-uv` from 8.1.0 to 8.2.0 - [Release notes](https://github.com/astral-sh/setup-uv/releases) - [Commits](https://github.com/astral-sh/setup-uv/compare/08807647e7069bb48b6ef5acd8ec9567f424441b...fac544c07dec837d0ccb6301d7b5580bf5edae39) Updates `docker/setup-buildx-action` from 4.0.0 to 4.1.0 - [Release notes](https://github.com/docker/setup-buildx-action/releases) - [Commits](https://github.com/docker/setup-buildx-action/compare/4d04d5d9486b7bd6fa91e7baf45bbb4f8b9deedd...d7f5e7f509e45cec5c76c4d5afdd7de93d0b3df5) Updates `docker/login-action` from 4.1.0 to 4.2.0 - [Release notes](https://github.com/docker/login-action/releases) - [Commits](https://github.com/docker/login-action/compare/4907a6ddec9925e35a0a9e82d7399ccc52663121...650006c6eb7dba73a995cc03b0b2d7f5ca915bee) Updates `docker/metadata-action` from 6.0.0 to 6.1.0 - [Release notes](https://github.com/docker/metadata-action/releases) - [Commits](https://github.com/docker/metadata-action/compare/030e881283bb7a6894de51c315a6bfe6a94e05cf...80c7e94dd9b9319bd5eb7a0e0fe9291e23a2a2e9) Updates `docker/build-push-action` from 7.1.0 to 7.2.0 - [Release notes](https://github.com/docker/build-push-action/releases) - [Commits](https://github.com/docker/build-push-action/compare/bcafcacb16a39f128d818304e6c9c0c18556b85f...f9f3042f7e2789586610d6e8b85c8f03e5195baf) Updates `codecov/codecov-action` from 6.0.1 to 7.0.0 - [Release notes](https://github.com/codecov/codecov-action/releases) - [Changelog](https://github.com/codecov/codecov-action/blob/main/CHANGELOG.md) - [Commits](https://github.com/codecov/codecov-action/compare/e79a6962e0d4c0c17b229090214935d2e33f8354...fb8b3582c8e4def4969c97caa2f19720cb33a72f) --- updated-dependencies: - dependency-name: actions/checkout dependency-version: 6.0.3 dependency-type: direct:production update-type: version-update:semver-patch dependency-group: actions - dependency-name: astral-sh/setup-uv dependency-version: 8.2.0 dependency-type: direct:production update-type: version-update:semver-minor dependency-group: actions - dependency-name: docker/setup-buildx-action dependency-version: 4.1.0 dependency-type: direct:production update-type: version-update:semver-minor dependency-group: actions - dependency-name: docker/login-action dependency-version: 4.2.0 dependency-type: direct:production update-type: version-update:semver-minor dependency-group: actions - dependency-name: docker/metadata-action dependency-version: 6.1.0 dependency-type: direct:production update-type: version-update:semver-minor dependency-group: actions - dependency-name: docker/build-push-action dependency-version: 7.2.0 dependency-type: direct:production update-type: version-update:semver-minor dependency-group: actions - dependency-name: codecov/codecov-action dependency-version: 7.0.0 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>
103 lines
3.4 KiB
YAML
103 lines
3.4 KiB
YAML
name: Static Checks
|
|
|
|
on:
|
|
pull_request:
|
|
push:
|
|
branches: [main]
|
|
|
|
permissions:
|
|
contents: read
|
|
|
|
jobs:
|
|
static-checks:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
|
|
with:
|
|
persist-credentials: false
|
|
|
|
- name: Install uv
|
|
uses: astral-sh/setup-uv@fac544c07dec837d0ccb6301d7b5580bf5edae39 # v8.2.0
|
|
with:
|
|
enable-cache: true
|
|
|
|
- name: Set up Python
|
|
run: uv python install 3.13
|
|
|
|
- name: Lint GitHub Actions
|
|
run: |
|
|
# Install actionlint
|
|
bash <(curl https://raw.githubusercontent.com/rhysd/actionlint/main/scripts/download-actionlint.bash)
|
|
./actionlint -color
|
|
|
|
- name: Security audit GitHub Actions
|
|
run: |
|
|
# Run zizmor in an isolated environment using uvx
|
|
uvx zizmor .github/workflows/
|
|
|
|
- name: Check YAML files
|
|
run: |
|
|
python3 -c "
|
|
import yaml
|
|
from pathlib import Path
|
|
# Docker Compose merge tags are valid in compose files but unknown to safe_load
|
|
for _t in ('!reset', '!override'):
|
|
yaml.SafeLoader.add_constructor(_t, lambda loader, node: None)
|
|
for f in Path('.').rglob('*.yaml'):
|
|
if 'deployment/k8s' not in str(f):
|
|
list(yaml.safe_load_all(f.read_text()))
|
|
for f in Path('.').rglob('*.yml'):
|
|
if 'deployment/k8s' not in str(f):
|
|
list(yaml.safe_load_all(f.read_text()))
|
|
"
|
|
|
|
- name: Check TOML files
|
|
run: |
|
|
python3 -c "
|
|
import tomllib
|
|
from pathlib import Path
|
|
for f in Path('.').rglob('*.toml'):
|
|
tomllib.load(f.open('rb'))
|
|
"
|
|
|
|
- name: Check JSON files
|
|
run: |
|
|
python3 -c "
|
|
import json
|
|
from pathlib import Path
|
|
for f in Path('.').rglob('*.json'):
|
|
json.load(f.open())
|
|
"
|
|
|
|
- name: Check for merge conflicts
|
|
run: |
|
|
# Match exact git merge conflict markers:
|
|
# - <<<<<<< (followed by space, e.g., "<<<<<<< HEAD")
|
|
# - ======= (exactly 7 equals at end of line)
|
|
# - >>>>>>> (followed by space, e.g., ">>>>>>> branch-name")
|
|
! grep -rE '^(<{7} |>{7} |={7}$)' --include='*.py' --include='*.yaml' --include='*.yml' --include='*.toml' --include='*.json' . || exit 1
|
|
|
|
- name: Lint shell scripts
|
|
run: |
|
|
shellcheck --version
|
|
# Exclude external directories (node_data_storage contains cloned repos, external has vendored code)
|
|
find . -name '*.sh' -type f \
|
|
! -path './.git/*' \
|
|
! -path '*/.venv/*' \
|
|
! -path './node_data_storage/*' \
|
|
! -path './external/*' \
|
|
-print0 | xargs -0 shellcheck
|
|
|
|
- name: Lint Dockerfiles
|
|
run: |
|
|
# Install hadolint
|
|
curl -sL -o hadolint "https://github.com/hadolint/hadolint/releases/download/v2.12.0/hadolint-Linux-x86_64"
|
|
chmod +x hadolint
|
|
./hadolint --version
|
|
# Exclude external directories (node_data_storage contains cloned repos, external has vendored code)
|
|
find . -name 'Dockerfile*' -type f \
|
|
! -path './.git/*' \
|
|
! -path './node_data_storage/*' \
|
|
! -path './external/*' \
|
|
-print0 | xargs -0 ./hadolint
|