Skip to content

Commit 7b73908

Browse files
committed
chore: harden secrets baseline CI decision
Signed-off-by: lucarlig <luca.carlig@ibm.com>
1 parent 651aa81 commit 7b73908

21 files changed

Lines changed: 444 additions & 322 deletions

.github/workflows/alembic-upgrade-validation.yml

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -47,14 +47,8 @@ permissions:
4747
actions: read
4848

4949
jobs:
50-
ci-decision:
51-
uses: ./.github/workflows/secret-baseline-ci-decision.yml
52-
with:
53-
workflow-file: alembic-upgrade-validation.yml
54-
5550
upgrade-validation:
56-
needs: ci-decision
57-
if: needs.ci-decision.outputs.run-full-ci == 'true' && (github.event_name != 'pull_request' || !github.event.pull_request.draft)
51+
if: github.event_name != 'pull_request' || !github.event.pull_request.draft
5852
name: SQLite + PostgreSQL Fresh/Upgrade
5953
runs-on: ubuntu-latest
6054
timeout-minutes: 50

.github/workflows/dependency-review.yml

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -45,20 +45,13 @@ concurrency:
4545
# Minimal permissions - principle of least privilege
4646
# -----------------------------------------------------------------
4747
permissions:
48-
actions: read
4948
contents: read # for actions/checkout
5049
security-events: write # upload SARIF results
5150
pull-requests: write # post / overwrite PR comment
5251

5352
jobs:
54-
ci-decision:
55-
uses: ./.github/workflows/secret-baseline-ci-decision.yml
56-
with:
57-
workflow-file: dependency-review.yml
58-
5953
dependency-review:
60-
needs: ci-decision
61-
if: needs.ci-decision.outputs.run-full-ci == 'true' && (github.event_name != 'pull_request' || !github.event.pull_request.draft)
54+
if: github.event_name != 'pull_request' || !github.event.pull_request.draft
6255
runs-on: ubuntu-slim
6356
timeout-minutes: 15
6457

.github/workflows/docker-multiplatform.yml

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -45,22 +45,18 @@ concurrency:
4545
cancel-in-progress: true
4646

4747
permissions:
48-
actions: read
4948
contents: read
5049

5150
env:
5251
REGISTRY: ghcr.io
5352
IMAGE_NAME: ${{ github.repository }}
5453

5554
jobs:
56-
ci-decision:
57-
uses: ./.github/workflows/secret-baseline-ci-decision.yml
58-
with:
59-
workflow-file: docker-multiplatform.yml
60-
55+
# ---------------------------------------------------------------
56+
# Build each platform in parallel
57+
# ---------------------------------------------------------------
6158
build:
62-
needs: ci-decision
63-
if: needs.ci-decision.outputs.run-full-ci == 'true' && (github.event_name != 'pull_request' || !github.event.pull_request.draft)
59+
if: github.event_name != 'pull_request' || !github.event.pull_request.draft
6460
name: Build ${{ matrix.suffix }}
6561
strategy:
6662
fail-fast: false

.github/workflows/docker-scan.yml

Lines changed: 3 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -39,21 +39,14 @@ concurrency:
3939
cancel-in-progress: true
4040

4141
permissions:
42-
actions: read
4342
contents: read
4443

4544
env:
4645
IMAGE_NAME: mcp-context-forge-scan
4746

4847
jobs:
49-
ci-decision:
50-
uses: ./.github/workflows/secret-baseline-ci-decision.yml
51-
with:
52-
workflow-file: docker-scan.yml
53-
5448
container-smoke:
55-
needs: ci-decision
56-
if: needs.ci-decision.outputs.run-full-ci == 'true' && (github.event_name != 'pull_request' || !github.event.pull_request.draft)
49+
if: github.event_name != 'pull_request' || !github.event.pull_request.draft
5750
name: Container Smoke (${{ matrix.name }})
5851
runs-on: ubuntu-latest
5952
timeout-minutes: 30
@@ -93,8 +86,7 @@ jobs:
9386
# Build image and generate SBOM
9487
# ---------------------------------------------------------------
9588
scan:
96-
needs: ci-decision
97-
if: needs.ci-decision.outputs.run-full-ci == 'true' && (github.event_name != 'pull_request' || !github.event.pull_request.draft)
89+
if: github.event_name != 'pull_request' || !github.event.pull_request.draft
9890
name: Security Scan
9991
runs-on: ubuntu-latest
10092
timeout-minutes: 30
@@ -160,8 +152,7 @@ jobs:
160152
retention-days: 30
161153

162154
rust-enabled-build:
163-
needs: ci-decision
164-
if: needs.ci-decision.outputs.run-full-ci == 'true' && (github.event_name != 'pull_request' || !github.event.pull_request.draft)
155+
if: github.event_name != 'pull_request' || !github.event.pull_request.draft
165156
name: Rust-enabled container smoke
166157
runs-on: ubuntu-latest
167158
timeout-minutes: 60

.github/workflows/helm-publish.yml

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -42,19 +42,15 @@ concurrency:
4242
cancel-in-progress: true
4343

4444
permissions:
45-
actions: read
4645
contents: read
4746

4847
jobs:
49-
ci-decision:
50-
uses: ./.github/workflows/secret-baseline-ci-decision.yml
51-
with:
52-
workflow-file: helm-publish.yml
53-
48+
# -----------------------------------------------------------------------
49+
# Lint – always runs to catch chart issues early
50+
# -----------------------------------------------------------------------
5451
lint:
5552
name: Lint chart
56-
needs: ci-decision
57-
if: needs.ci-decision.outputs.run-full-ci == 'true' && (github.event_name != 'pull_request' || !github.event.pull_request.draft)
53+
if: github.event_name != 'pull_request' || !github.event.pull_request.draft
5854
runs-on: ubuntu-slim
5955
timeout-minutes: 10
6056

.github/workflows/license-check.yml

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -21,18 +21,11 @@ concurrency:
2121
cancel-in-progress: true
2222

2323
permissions:
24-
actions: read
2524
contents: read
2625

2726
jobs:
28-
ci-decision:
29-
uses: ./.github/workflows/secret-baseline-ci-decision.yml
30-
with:
31-
workflow-file: license-check.yml
32-
3327
license-check:
34-
needs: ci-decision
35-
if: needs.ci-decision.outputs.run-full-ci == 'true' && (github.event_name != 'pull_request' || !github.event.pull_request.draft)
28+
if: github.event_name != 'pull_request' || !github.event.pull_request.draft
3629
runs-on: ubuntu-latest
3730
timeout-minutes: 20
3831
steps:

.github/workflows/lint-web.yml

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -25,18 +25,11 @@ concurrency:
2525
cancel-in-progress: true
2626

2727
permissions:
28-
actions: read
2928
contents: read
3029

3130
jobs:
32-
ci-decision:
33-
uses: ./.github/workflows/secret-baseline-ci-decision.yml
34-
with:
35-
workflow-file: lint-web.yml
36-
3731
lint-web:
38-
needs: ci-decision
39-
if: needs.ci-decision.outputs.run-full-ci == 'true' && (github.event_name != 'pull_request' || !github.event.pull_request.draft)
32+
if: github.event_name != 'pull_request' || !github.event.pull_request.draft
4033
strategy:
4134
fail-fast: false
4235
matrix:
@@ -146,8 +139,7 @@ jobs:
146139
# 🐍 Python-based JS Security Scanner (separate job)
147140
# -------------------------------------------------------
148141
nodejsscan:
149-
needs: ci-decision
150-
if: needs.ci-decision.outputs.run-full-ci == 'true' && (github.event_name != 'pull_request' || !github.event.pull_request.draft)
142+
if: github.event_name != 'pull_request' || !github.event.pull_request.draft
151143
name: nodejsscan
152144
runs-on: ubuntu-latest
153145
timeout-minutes: 20

.github/workflows/lint.yml

Lines changed: 5 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,6 @@ concurrency:
2424
cancel-in-progress: true
2525

2626
permissions:
27-
actions: read
2827
contents: read
2928

3029
# Keep these pins in lockstep with the *_VERSION variables in the Makefile.
@@ -41,14 +40,11 @@ env:
4140
TOMLCHECK_VERSION: "0.2.3"
4241

4342
jobs:
44-
ci-decision:
45-
uses: ./.github/workflows/secret-baseline-ci-decision.yml
46-
with:
47-
workflow-file: lint.yml
48-
43+
# ---------------------------------------------------------------
44+
# Python linters - run on both mcpgateway/ and plugins/
45+
# ---------------------------------------------------------------
4946
python-lint:
50-
needs: ci-decision
51-
if: needs.ci-decision.outputs.run-full-ci == 'true' && (github.event_name != 'pull_request' || !github.event.pull_request.draft)
47+
if: github.event_name != 'pull_request' || !github.event.pull_request.draft
5248
strategy:
5349
fail-fast: false
5450
matrix:
@@ -101,8 +97,7 @@ jobs:
10197
# Repo-wide syntax/format checkers (run once, not per-target)
10298
# ---------------------------------------------------------------
10399
syntax-check:
104-
needs: ci-decision
105-
if: needs.ci-decision.outputs.run-full-ci == 'true' && (github.event_name != 'pull_request' || !github.event.pull_request.draft)
100+
if: github.event_name != 'pull_request' || !github.event.pull_request.draft
106101
strategy:
107102
fail-fast: false
108103
matrix:

.github/workflows/linting-full.yml

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -20,18 +20,11 @@ concurrency:
2020
cancel-in-progress: true
2121

2222
permissions:
23-
actions: read
2423
contents: read
2524

2625
jobs:
27-
ci-decision:
28-
uses: ./.github/workflows/secret-baseline-ci-decision.yml
29-
with:
30-
workflow-file: linting-full.yml
31-
3226
linting-full:
33-
needs: ci-decision
34-
if: needs.ci-decision.outputs.run-full-ci == 'true' && (github.event_name != 'pull_request' || !github.event.pull_request.draft)
27+
if: github.event_name != 'pull_request' || !github.event.pull_request.draft
3528
name: linting-full
3629
runs-on: ubuntu-slim
3730
timeout-minutes: 30

.github/workflows/playwright.yml

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -12,22 +12,15 @@ on:
1212
workflow_dispatch:
1313

1414
permissions:
15-
actions: read
1615
contents: read
1716

1817
concurrency:
1918
group: ${{ github.workflow }}-${{ github.ref }}
2019
cancel-in-progress: true
2120

2221
jobs:
23-
ci-decision:
24-
uses: ./.github/workflows/secret-baseline-ci-decision.yml
25-
with:
26-
workflow-file: playwright.yml
27-
2822
playwright-ci-smoke:
29-
needs: ci-decision
30-
if: needs.ci-decision.outputs.run-full-ci == 'true' && (github.event_name != 'pull_request' || !github.event.pull_request.draft)
23+
if: github.event_name != 'pull_request' || !github.event.pull_request.draft
3124
name: playwright-ci-smoke
3225
runs-on: ubuntu-24.04
3326
timeout-minutes: 40

0 commit comments

Comments
 (0)