CI/CD pipeline advisor for GitHub Actions workflows, deployment scripts, and server task scheduling. Use when: (1) editing or reviewing .github/workflows/*.yml files, (2) working on deployment...
Advisory guidance for robust and secure CI/CD pipelines in the SAPPHIRE project.
Role: Review, advise, and suggest improvements. Does not execute server commands directly or indirectly.
Developer ā GitHub Actions ā Docker Hub ā AWS Server ā Local Hydromet Servers
ā
āāā build_test.yml (on push/PR)
ā āāā Test builds, unit tests
ā
āāā deploy_main.yml (on merge to main)
āāā Build, sign, push images with attestations
When reviewing or editing workflow files, verify:
@v4 not @main)permissions: scope (prefer read over write)${{ secrets.* }} never hardcoded${{ github.event.* }} in run:timeout-minutes:)| Feature | Status | Purpose |
|---|---|---|
| SLSA Provenance | Enabled | Supply chain attestation |
| SBOM Generation | Enabled | Software Bill of Materials |
| Cosign Signing | Enabled | Image signature verification |
| Non-root User | In images | Container security |
| Pinned Actions | Yes | Reproducible builds |
jobs:
test:
runs-on: ubuntu-latest
build:
needs: test # Only runs if test passes
ML image builds (~4GB) need disk cleanup:
- name: Free disk space
run: |
sudo rm -rf /usr/share/dotnet
sudo rm -rf /opt/ghc
sudo rm -rf /usr/local/share/boost
sudo rm -rf /usr/local/lib/android
- uses: docker/build-push-action@v6
with:
provenance: true
sbom: true
When reviewing scripts in bin/, check for:
set -e or equivalent)āāāāāāāāāāāāāā minute (0-59)
ā āāāāāāāāāāāāāā hour (0-23)
ā ā āāāāāāāāāāāāāā day of month (1-31)
ā ā ā āāāāāāāāāāāāāā month (1-12)
ā ā ā ā āāāāāāāāāāāāāā day of week (0-6, Sun=0)
ā ā ā ā ā
* * * * *
# Examples
0 6 * * * # Daily at 6:00 AM
0 */6 * * * # Every 6 hours
0 6 1 * * # First day of month at 6:00 AM
Persistent=true (runs missed jobs)journalctl| Issue | Solution |
|---|---|
| Build timeout | Add timeout-minutes: 60 |
| ML build fails | Add disk cleanup step |
| Docker rate limits | Use authenticated pulls |
| Workflow not triggering | Check on: triggers and branch rules |