Skip to content

Commit a1c42a9

Browse files
authored
Merge pull request #1251 from Goodnessukaigwe/fix/1219-prune-redundant-github-workflow-templates-and-standardize-on-one
[1219] Prune redundant GitHub workflow templates and standardize on one
2 parents f8ace0a + 8348eb0 commit a1c42a9

21 files changed

Lines changed: 106 additions & 312 deletions

.cargo/audit.toml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -102,9 +102,9 @@ ignore = [
102102
"RUSTSEC-2026-0192",
103103

104104
# ── Ignored advisories previously carried as inline --ignore flags ─────────
105-
# These were maintained in 3 separate workflow YAML files (ci.yml,
106-
# dependency-review.yml, maintenance.yml) and often drifted out of sync.
107-
# Consolidated here so .cargo/audit.toml is the single source of truth.
105+
# These were maintained across workflow YAML files and often drifted out of
106+
# sync. Consolidated here so .cargo/audit.toml is the single source of truth.
107+
# Canonical cargo-audit runners: ci.yml (PR/push) and security-audit.yml (schedule).
108108
#
109109
# time 0.3.36 – potential overflow in instant conversion (RUSTSEC-2020-0071).
110110
# Transitive via backoff → kube-runtime. No patched version available in our

.github/CI_COMMANDS.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -287,6 +287,20 @@ cargo audit # Uses .cargo/audit.toml config
287287
- **PR/push path:** `ci.yml` `security-audit` (runs when dependency files change).
288288
- **Schedule / SBOM / cargo-deny / scorecard:** `.github/workflows/security-audit.yml`
289289
(schedule + `workflow_dispatch` only — no duplicate PR trigger).
290+
- **Not duplicated in:** `dependency-review.yml` or `maintenance.yml`.
291+
292+
### Security scanning (Trivy / Checkov)
293+
- **Canonical workflow:** `.github/workflows/security-scan.yml` (push to `main`,
294+
schedule, `workflow_dispatch`). Uses `.github/actions/security-scan` for image scans.
295+
- **CI image scan after publish:** `ci.yml` `security-scan` job (same composite action).
296+
297+
### Maintenance workflow
298+
- **Unique job only:** `maintenance.yml` → stale-artifact regression tests.
299+
- Scheduled cargo-audit / docs link checks live in `security-audit.yml` / `link-check.yml`.
300+
301+
### Issue templates
302+
- **Single maintenance/chore template:** `.github/ISSUE_TEMPLATE/maintenance.yml`
303+
(covers dependency updates, CI hygiene, docs, refactors).
290304

291305
### Release gate vs release.yml
292306
- `release.yml` `validate` owns semver + Cargo.toml matching; helm job owns helm lint.

.github/CODEOWNERS

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,4 +37,4 @@ README.md @stellar-k8s-maintainers @docs-team
3737

3838
# Benchmarking
3939
/benchmarks/ @performance-team
40-
/.github/workflows/benchmark.yml @performance-team
40+
/.github/workflows/performance.yml @performance-team

.github/ISSUE_TEMPLATE/dependency_update.yml

Lines changed: 0 additions & 64 deletions
This file was deleted.

.github/ISSUE_TEMPLATE/maintenance.yml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,9 @@ body:
99
Use this template for maintenance tasks: dependency bumps, CI fixes, doc updates,
1010
code cleanup, refactors, and other work that does not add features or fix bugs.
1111
12+
> When opening a PR for this issue, select **Maintenance / hygiene** in the PR
13+
> template and fill in the **Maintenance task checklist** section.
14+
1215
- type: dropdown
1316
id: category
1417
attributes:
@@ -20,6 +23,7 @@ body:
2023
- Documentation
2124
- Code cleanup / refactor
2225
- Build system / tooling
26+
- Configuration drift
2327
- Repository hygiene
2428
- Other
2529
validations:
@@ -45,6 +49,15 @@ body:
4549
validations:
4650
required: true
4751

52+
- type: textarea
53+
id: packages
54+
attributes:
55+
label: Package(s) Affected (dependencies only)
56+
description: For dependency updates, list crate(s) or tool(s) with current → target versions. Leave blank otherwise.
57+
placeholder: |
58+
- `kube` 0.89 → 0.91
59+
- `tokio` 1.36 → 1.38
60+
4861
- type: textarea
4962
id: acceptance_criteria
5063
attributes:
@@ -64,6 +77,7 @@ body:
6477
placeholder: |
6578
- [ ] Run `cargo check` and paste the output
6679
- [ ] CI passes on the PR
80+
- [ ] `cargo audit` is clean (for dependency changes)
6781
validations:
6882
required: true
6983

.github/ISSUE_TEMPLATE/maintenance_task.yml

Lines changed: 0 additions & 49 deletions
This file was deleted.

.github/workflows/dependency-review.yml

Lines changed: 7 additions & 47 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,11 @@
11
name: Dependency & License Review
22

3-
# Automatically detects stale dependencies, license drift, and security
4-
# advisories on every push/PR that touches Cargo files, and on a weekly
5-
# schedule so that newly published advisories are caught promptly.
3+
# Unique dependency-review gates (stale deps, lockfile diff, license inventory,
4+
# cargo-deny on dep changes). cargo-audit is intentionally NOT duplicated here:
5+
# - PR/push: ci.yml `security-audit`
6+
# - Schedule: security-audit.yml
67
#
7-
# Addresses GitHub Issue #1119.
8+
# Addresses GitHub Issue #1119; deduplicated in #1219.
89

910
on:
1011
push:
@@ -22,7 +23,7 @@ on:
2223
- "deny.toml"
2324
- ".cargo/audit.toml"
2425
schedule:
25-
# Run weekly on Mondays at 08:00 UTC to catch newly published advisories.
26+
# Run weekly on Mondays at 08:00 UTC for stale-deps + license inventory.
2627
- cron: "0 8 * * 1"
2728
workflow_dispatch:
2829
inputs:
@@ -43,48 +44,7 @@ env:
4344
CARGO_TERM_COLOR: always
4445

4546
jobs:
46-
# ── 1. cargo audit — known vulnerabilities ──────────────────────────────────
47-
cargo-audit:
48-
name: Cargo Audit (Vulnerabilities)
49-
runs-on: ubuntu-latest
50-
timeout-minutes: 10
51-
steps:
52-
- uses: actions/checkout@v4
53-
54-
- name: Setup Rust
55-
uses: ./.github/actions/setup-rust
56-
with:
57-
cache-key: "ci-audit"
58-
extra-tools: "cargo-audit"
59-
60-
- name: Install cargo-audit
61-
run: |
62-
for i in 1 2 3; do
63-
cargo install --locked cargo-audit && break
64-
echo "Attempt $i failed, retrying..."
65-
sleep 5
66-
done
67-
68-
- name: Run cargo audit
69-
run: |
70-
echo "── Security advisory audit ──────────────────────────────────────"
71-
cargo audit
72-
73-
- name: Generate audit JSON report
74-
if: always()
75-
run: |
76-
cargo audit --json 2>/dev/null > audit-report.json || true
77-
echo "Audit report saved to audit-report.json"
78-
79-
- name: Upload audit report
80-
if: always()
81-
uses: actions/upload-artifact@v4
82-
with:
83-
name: cargo-audit-report
84-
path: audit-report.json
85-
retention-days: 30
86-
87-
# ── 2. cargo deny — license + bans + advisories ─────────────────────────────
47+
# ── 1. cargo deny — license + bans + advisories ─────────────────────────────
8848
cargo-deny:
8949
name: Cargo Deny (Licenses + Bans)
9050
runs-on: ubuntu-latest

.github/workflows/maintenance.yml

Lines changed: 7 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,12 @@
11
name: Maintenance
22

3+
# Weekly hygiene that is NOT covered by other workflows:
4+
# - security-audit.yml → scheduled cargo-audit / cargo-deny / scorecard / SBOM
5+
# - link-check.yml → scheduled lychee link rot
6+
# - ci.yml → PR/push gates
7+
#
8+
# Unique value here: stale-artifact cleanup regression coverage.
9+
310
on:
411
schedule:
512
- cron: '0 9 * * 1' # Every Monday at 09:00 UTC
@@ -20,42 +27,3 @@ jobs:
2027

2128
- name: Run stale artifact cleanup regression tests
2229
run: cargo test stale_artifact_cleanup -- --nocapture
23-
24-
dependency-audit:
25-
name: Dependency Audit
26-
runs-on: ubuntu-latest
27-
timeout-minutes: 10
28-
steps:
29-
- uses: actions/checkout@v4
30-
31-
- name: Setup Rust
32-
uses: ./.github/actions/setup-rust
33-
with:
34-
cache-key: "ci-audit-maintenance"
35-
extra-tools: "cargo-audit"
36-
37-
- name: Install cargo-audit
38-
run: |
39-
for i in 1 2 3; do
40-
cargo install cargo-audit --locked && break
41-
echo "Attempt $i failed, retrying..."
42-
sleep 5
43-
done
44-
45-
- name: Run security audit
46-
run: cargo audit
47-
48-
docs-health:
49-
name: Docs Health Check
50-
runs-on: ubuntu-latest
51-
timeout-minutes: 10
52-
steps:
53-
- uses: actions/checkout@v4
54-
55-
- name: Set up Python
56-
uses: actions/setup-python@v6
57-
with:
58-
python-version: '3.12'
59-
60-
- name: Check documentation links
61-
run: python3 scripts/check-links.py

.github/workflows/security-scan.yml

Lines changed: 12 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,23 @@
11
name: Security Scanning
22

3+
# Canonical Trivy / Checkov security scanning workflow.
4+
# Image Trivy on the published CI image also runs via the
5+
# `.github/actions/security-scan` composite from `ci.yml` (push to main).
6+
# This workflow covers filesystem + IaC scans and a standalone image build scan
7+
# on schedule / main pushes / manual dispatch.
8+
39
on:
410
push:
5-
branches: [develop]
11+
branches: [main]
612
paths:
713
- "**.rs"
814
- "**.yaml"
915
- "**.yml"
1016
- "charts/**"
1117
- "Dockerfile*"
1218
- "Makefile"
19+
- ".github/workflows/security-scan.yml"
20+
- ".github/actions/security-scan/**"
1321
schedule:
1422
- cron: "0 3 * * *"
1523
workflow_dispatch:
@@ -55,19 +63,10 @@ jobs:
5563
- name: Build Docker image
5664
run: docker build -t stellar-operator:scan .
5765

58-
- name: Run Trivy on Docker image
59-
uses: aquasecurity/trivy-action@v0.36.0
66+
- name: Security Scan
67+
uses: ./.github/actions/security-scan
6068
with:
6169
image-ref: stellar-operator:scan
62-
format: sarif
63-
output: trivy-docker.sarif
64-
severity: CRITICAL,HIGH
65-
66-
- name: Upload Trivy Docker scan
67-
uses: github/codeql-action/upload-sarif@v4
68-
if: always()
69-
with:
70-
sarif_file: trivy-docker.sarif
7170

7271
iac-checkov:
7372
name: IaC Security Scan (Helm/K8s manifests)
@@ -82,7 +81,7 @@ jobs:
8281
uses: bridgecrewio/checkov-action@v12
8382
with:
8483
directory: charts/
85-
framework: kubernetes
84+
framework: helm
8685
output_format: sarif
8786
output_file_path: checkov-results.sarif
8887
continue-on-error: true
@@ -92,4 +91,3 @@ jobs:
9291
if: always()
9392
with:
9493
sarif_file: checkov-results.sarif
95-

0 commit comments

Comments
 (0)