Repository navigation
chore: bind the compose stack to loopback and pin the release supply chain - #487
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #473. Closes #474.
#473: compose stack on loopback, no default owner
docker-compose.yml: the API is published as127.0.0.1:${API_PORT:-5312}:5312, and Postgres is no longer published (only the API container reaches it over the compose network). I checked the docs and scripts for anything that reaches the quickstart Postgres from the host and found none; the README now points atdocker compose exec postgres psql -U seamless seamless_authfor a shell.POSTGRES_PORTno longer applies to this file.OWNER_EMAILhas no default (${OWNER_EMAIL:-}), so the owner grant is off unless it is set. I chose this over requiring it sodocker compose up(anddocker compose config) still work with no environment; the README quickstart now leads withOWNER_EMAIL=you@example.com docker compose upand explains that without it nobody is granted admin.validateEnvs.shdoes not checkOWNER_EMAIL, andsrc/lib/ownerAdmin.tsalready treats an empty value as unset.docker-compose.dev.ymlhad the same exposure, so it gets the same treatment: API and Postgres on127.0.0.1, noOWNER_EMAILdefault. Postgres stays published there (on loopback) because CONTRIBUTING documents running the suite withTEST_DB=postgres.docs/configuration.md(development mode section) andREADME.mdnote the bind address and why (Docker publishing bypasses host firewalls such as ufw).docker compose configoutput, both files: the API port renders withhost_ip: 127.0.0.1, the quickstart Postgres has noports, the dev Postgres rendershost_ip: 127.0.0.1, andOWNER_EMAILrenders as""(or the passed value withOWNER_EMAIL=me@example.com).#474: pinned release supply chain
SEAMLESS_ADMIN_DASHBOARD_REFis nowe16c1e84e6a105fb7cadc328570a2fbc469f463d, the commit of dashboard tagv0.10.1(the tag already pinned; it is a lightweight tag, confirmed withgit ls-remoteand the refs API). The tag is kept in the comment above the ARG. The build refuses a ref that is not a full 40-character SHA and, aftercheckout --detach, checksgit rev-parse HEADagainst it. Verified locally:docker build --target admin-dashboard .succeeds, and--build-arg SEAMLESS_ADMIN_DASHBOARD_REF=v0.10.1fails with "SEAMLESS_ADMIN_DASHBOARD_REF must be a full commit SHA". There was no existing check inscripts/ortests/that parses this ARG; the seamless-cliSEAMLESS_ADMIN_DASHBOARD_REFis an unrelated env var in that repo.docs/configuration.mddescribes the new bump procedure.actions/checkoutv7.0.1,actions/setup-nodev7.1.0,codecov/codecov-actionv7.1.1docker/setup-buildx-actionv4.4.1,docker/login-actionv4.6.0,docker/metadata-actionv6.2.0,docker/build-push-actionv7.4.0aquasecurity/trivy-actionv0.36.0,sigstore/cosign-installerv3.9.1,github/codeql-action/*v4.39.1changesets/actionv2.1.2 (@v2was a branch, currently identical to the v2.1.2 tag)fells-code/seamless-cliv0.25.1(66cb013).mainis two commits ahead of that tag, but neither touchesverify-conformance.yml, and the workflow still checks out the CLI at its owncli-refinput, so behaviour is the same.ci.ymlgets top-levelpermissions: contents: read.github-actionsalready exists in.github/dependabot.yml(weekly, grouped), so no change; it updates SHA pins and their version comments.SECURITY.mdanddocs/production-operations.mdalready document the narrowed identity^https://github\.com/fells-code/seamless-auth-api/\.github/workflows/docker-publish\.yml@refs/(heads/main|tags/v.*)$. The one place still printing the broad^https://github.com/<repo>/regexp was the job summary indocker-publish.yml, which now prints the same narrowed form. That is a text-only change to the summary step.Note on the issue's suggested identity
The issue suggests verifying against
docker-publish.yml@refs/tags/v*only. That would reject every current release. Releases are cut byrelease.ymlonmain, which callsdocker-publish.ymlas a reusable workflow (a tag pushed withGITHUB_TOKENdoes not trigger the tag-push path; the last tag-push run of docker-publish was v0.7.3 in August). For a reusable workflow, Fulcio's SAN is the called workflow at the caller's ref. I read the signing certificate on the publishedv0.19.4/latestimage from GHCR and its identity ishttps://github.com/fells-code/seamless-auth-api/.github/workflows/docker-publish.yml@refs/heads/main. So the documented regexp keepsheads/main(real releases) plustags/v.*(a tag pushed by hand), and still rejects any other workflow or branch.Not changed
uses:refs, theci.ymlpermissions block, and the summary text changed.Lint workflowsjob in this PR runs it.Checks
npm run typecheck: passnpm run lint: passnpx prettier --check .: passnpm run build: passnpm run coverage: pass, 141 files, 1977 tests passed (1 todo), thresholds met (98.9% statements, 95.4% branches, 99.2% functions, 99.13% lines)npm run check:changeset-bump: no major changesetsdocker compose configanddocker compose -f docker-compose.dev.yml config: valid, output as described abovedocker build --target admin-dashboard .: pass; with a tag as the build arg: fails as intended