Files
molecule-ai-workspace-templ…/.gitea/workflows/secret-scan.yml
T
hongmingandClaude Opus 5.5 6553d06008
meta-ci-advisory / meta (advisory) (push) Skipped
sync-providers-yaml / Compare synced providers.yaml against controlplane canonical (pull_request) Skipped
publish-image / Resolve runtime version (push) Skipped
publish-image / Classify change (decouple publish from promote) (push) Skipped
publish-image / Build & push workspace-template-hermes image (push) Skipped
publish-image / Promote runtime_image_pins (CP admin) (staging-api.moleculesai.app, staging) (push) Skipped
publish-image / Verify runtime_image_pins moved (fail-loud) (staging-api.moleculesai.app, staging) (push) Skipped
Secret scan / Scan diff for credential-shaped strings (push) Skipped
sync-providers-yaml / Compare synced providers.yaml against controlplane canonical (push) Skipped
verify-providers-projection / Regenerate projection, fail on drift, assert registry ⊆ template (push) Skipped
meta-ci-advisory / meta (advisory) (pull_request) Successful in 5s
Secret scan / Scan diff for credential-shaped strings (pull_request) Successful in 6s
CI / Template validation (static) (pull_request) Successful in 17s
CI / Template validation (static) (push) Successful in 17s
verify-providers-projection / Regenerate projection, fail on drift, assert registry ⊆ template (pull_request) Successful in 15s
CI / Adapter-socket conformance (push) Successful in 43s
CI / Adapter-socket conformance (pull_request) Successful in 45s
CI / Shell unit tests (pull_request) Successful in 39s
CI / Shell unit tests (push) Successful in 33s
CI / Gateway live round-trip (pinned hermes) (pull_request) Successful in 1m2s
CI / Gateway live round-trip (pinned hermes) (push) Successful in 1m14s
CI / Template validation (runtime) (push) Successful in 5m48s
CI / Template validation (runtime) (pull_request) Successful in 6m13s
CI / T4 tier-4 conformance (live) (pull_request) Successful in 6m14s
CI / T4 tier-4 conformance (live) (push) Successful in 5m56s
CI / validate (pull_request) Successful in 1s
CI / validate (push) Successful in 1s
CI / all-required (pull_request) Successful in 2s
CI / all-required (push) Successful in 1s
Merge branch 'main' into fix/ci-concurrency-cancel-superseded
Bring the branch up to date with main (231 commits behind).

One conflict, in .gitea/workflows/secret-scan.yml: main rewrote the
file header and left a blank line exactly where this branch's
`concurrency:` block sat. Resolved by taking main's file verbatim and
re-inserting the branch's three lines between `name: Secret scan` and
`on:`, with blank-line separators to match main's layout. The net diff
against main is that block only.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-09 08:49:50 -07:00

81 lines
2.8 KiB
YAML

# Canonical inline diff secret gate. The workflow/job names preserve the
# established `Secret scan / Scan diff for credential-shaped strings` context.
name: Secret scan
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
on:
pull_request:
types: [opened, synchronize, reopened]
push:
branches: [main, staging]
permissions:
contents: read
jobs:
scan:
name: Scan diff for credential-shaped strings
runs-on: ubuntu-latest
timeout-minutes: 8
env:
MOLECULE_CI_REF: 11b8598e5c0b3f0b1031733a8d5f6bc238f146a4
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd
with:
fetch-depth: 2
persist-credentials: false
- name: Fetch immutable molecule-ci scanner
run: |
set -euo pipefail
: "${RUNNER_TEMP:?RUNNER_TEMP is required}"
CI_ROOT="$RUNNER_TEMP/molecule-ci-ssot"
mkdir "$CI_ROOT"
git init -q "$CI_ROOT"
git -C "$CI_ROOT" remote add origin \
https://git.moleculesai.app/molecule-ai/molecule-ci.git
fetched=false
for attempt in 1 2 3; do
if GIT_ASKPASS=/bin/false GIT_TERMINAL_PROMPT=0 \
git -c credential.helper= -c http.userAgent=curl/8.4.0 \
-C "$CI_ROOT" fetch --no-tags --depth 1 origin "$MOLECULE_CI_REF"; then
fetched=true
break
fi
sleep "$attempt"
done
if [ "$fetched" != true ]; then
echo "::error::immutable molecule-ci scanner fetch failed"
exit 1
fi
git -C "$CI_ROOT" checkout -q --detach FETCH_HEAD
ACTUAL_CI_REF="$(git -C "$CI_ROOT" rev-parse HEAD)"
if [ "$ACTUAL_CI_REF" != "$MOLECULE_CI_REF" ]; then
echo "::error::immutable molecule-ci scanner ref mismatch"
exit 1
fi
- name: Scan exact changed content with fail-closed tree fallback
env:
PR_BASE_SHA: ${{ github.event.pull_request.base.sha }}
PR_HEAD_SHA: ${{ github.event.pull_request.head.sha }}
PUSH_BEFORE: ${{ github.event.before }}
PUSH_AFTER: ${{ github.event.after }}
run: |
set -o pipefail
if [ "${{ github.event_name }}" = pull_request ]; then
BASE=$PR_BASE_SHA
HEAD=$PR_HEAD_SHA
else
BASE=$PUSH_BEFORE
HEAD=$PUSH_AFTER
fi
python3 "$RUNNER_TEMP/molecule-ci-ssot/scripts/scan_diff_secrets.py" \
--repo-root . --base "$BASE" --head "$HEAD" \
| tee /tmp/secret-scan.log
- name: Assert scanner execution sentinel
if: always()
run: grep -qxF 'secret-scan:sentinel:executed' /tmp/secret-scan.log