@davoodmehraban89 / medusa / commits / 28a0fc09
Fork 0

docs(security): record verified inherited CI failures and validation gates

davoodmehraban89 committed Oct 14, 2026 at 22:34 UTC 28a0fc096e49c112419b7feb982ed84cbdcc8a1a
1 file changed +48
.github/SECURITY_BASELINE.md new
+48
@@ -0,0 +1,48 @@
1 +# Security automation baseline — owner fork
2 +
3 +Reviewed: 2026-10-14
4 +Repository: `davoodmehraban89/medusa` (public; default branch `main`)
5 +Scope: propose security automation by PR only. **Not yet a passed security audit or production approval.**
6 +
7 +## Baseline findings (before this PR)
8 +
9 +1. `.github/dependabot.yml` already existed on `main`: root Yarn workspace, `/www`, and GitHub Actions had weekly checks but `open-pull-requests-limit: 0`, keeping ordinary version-bump PRs disabled. Dependabot **security-update PRs** still require enabling the corresponding repository setting.
10 +2. No dedicated CodeQL or Gitleaks workflow was present in the inspected `.github/workflows/` directory on `main`.
11 +3. Numerous workflows were imported from `medusajs/medusa` and depend on that organization's GitHub App tokens, Linear integration, or external bots. They should not be treated as functioning local security controls.
12 +4. Actual Actions run 38534165110 (2026-10-14) — `Triage Dependabot Alerts` — failed at "Triage alerts"; its logs show the `GH_TOKEN` environment variable is empty and the script queries `/repos/medusajs/medusa/dependabot/alerts`, not this fork's owner/repository. No alerts were successfully triaged by that run.
13 +5. Actual Actions run 38569275140 (2026-10-14) — `Security Advisories to Linear` — failed at GitHub App token creation (`Input required and not supplied: app-id`). This workflow is not a functioning security escalation for this fork.
14 +6. Previous `Commerce storefront checks` run 38457109616 completed successfully on the separate `project/medusa-foundation-audit` PR branch. It demonstrates a working basic build/test job, **not** a security assessment.
15 +7. Imported root `SECURITY.md` directs reporters to the upstream team's address `security@medusajs.com`. A fork-specific reporting policy and verified private contact mechanism are required before live launch.
16 +
17 +**Important:** These are configuration and CI evidence findings, not proof of a code exploit, an exposed secret, or the absence of vulnerabilities. No existing Dependabot alert inventory or historical-secret scan has been verified yet.
18 +
19 +## Controls introduced by this PR
20 +
21 +| Control | File | Trigger | Intent |
22 +| --- | --- | --- | --- |
23 +| CodeQL JS/TS | `.github/workflows/security-codeql.yml` + `.github/codeql/codeql-config.yml` | PR/push on code or workflow changes; weekly schedule; manual | Check local app plus Medusa packages and scripts. Excludes build output/fixtures/tests, not production source. |
24 +| CodeQL GitHub Actions | `.github/workflows/security-codeql.yml` | Same | Flag risky expressions and execution patterns in imported GitHub Actions YAML. |
25 +| Gitleaks | `.github/workflows/security-secrets.yml` | All PRs, main push, weekly, manual | Scan Git history for accidental credentials. PR comments, SARIF artifacts and job summaries are disabled to reduce inadvertent disclosure of findings. |
26 +| Dependabot storefront | `.github/dependabot.yml` | Weekly, after `commerce/package.json` is merged into main | Open reviewed dependency-update PRs for the standalone storefront, including security updates. Keep legacy root `open-pull-requests-limit: 0` behavior unchanged. |
27 +
28 +GitHub Actions have minimum practical permissions: CodeQL `contents: read`, `security-events: write`, `actions: read`; Gitleaks `contents: read` only. Neither workflow has repository secrets or production infrastructure credentials.
29 +
30 +## Validation gates
31 +
32 +- [ ] Check that the CodeQL JavaScript/TypeScript job completes and uploads results.
33 +- [ ] Check that the CodeQL GitHub Actions job completes and uploads results.
34 +- [ ] Check that Gitleaks completes with no findings (or triage every finding privately).
35 +- [ ] Confirm Dependabot config is accepted; verify alerts/security updates enabled in Settings > Security & analysis (connector cannot verify private admin settings).
36 +- [ ] Review existing open alerts without dismissing them automatically.
37 +- [ ] Ensure mandatory status checks are set before merging security-sensitive changes, when repository rules/plan allow.
38 +- [ ] Address existing upstream-only automation failures in a separate, reviewed PR; do not supply private credentials merely to make vendor workflows run.
39 +- [ ] Review any finding, remediate, and rerun until checks pass. Rotate any actually exposed secret; deleting its file alone is not sufficient.
40 +- [ ] Adopt a fork-specific confidential vulnerability intake channel without sending user reports to an unaffiliated upstream contact.
41 +
42 +## Deployment / security readiness
43 +
44 +No credentials, production PSP integration, overseas corporate account, production server, or live checkout is provisioned by these changes. Passing these scans alone would not constitute compliance or secure production readiness.
45 +
46 +## PR verification log
47 +
48 +To be filled with exact Action run IDs, job conclusions and subsequent fixes after opening this PR. Do **not** check a box without evidence.