Skip to content

docs: add a security policy - #18

Merged
kalaspuff merged 1 commit into
mainfrom
fctl/47-security-policy
Oct 18, 2026
Merged

kalaspuff merged 1 commit into
mainfrom
fctl/47-security-policy

Conversation

@fctl-sh

@fctl-sh fctl-sh Bot commented Oct 18, 2026

Copy link
Copy Markdown
Contributor

Adds a SECURITY.md, as hyperstructure/fctl and hyperstructure/sandbox have. Reports go through GitHub's private vulnerability reporting, which an admin turns on once the repository is public.

fctl.sh serves /install, which people pipe to sh, so reports about the site shouldn't land in public issues.

This can merge before or after the repositories go public. Part of making fctl, fctl-site and design public: hyperstructure/fctl#95, hyperstructure/fctl#96, #17, hyperstructure/design#12, hyperstructure/sandbox#4.

Session: https://app.fctl.sh/s/ses_01M58A7MAFDWKZDCA239GR6H6G

Reports go through GitHub's private vulnerability reporting, which can be
turned on once the repository is public, as in hyperstructure/fctl and
hyperstructure/sandbox. fctl.sh serves the installer people pipe to sh, so
reports about it should not land in public issues.
kalaspuff pushed a commit to hyperstructure/fctl that referenced this pull request Oct 18, 2026
Release's `publish` job (which uses `CLOUDFLARE_API_TOKEN`) and CI's
`site-docs` job (which uses `SITE_DEPLOY_KEY`) now run in the
`production` environment, as the `deploy` job already does.

## Why

Before the repositories go public:

- **Today, any branch can read the production secrets.** `production`
has no branch rule, and the secrets are repository secrets. The run logs
show Release's `publish` job receives `CLOUDFLARE_API_TOKEN` without an
environment. Agent sessions' tokens have `contents: write` and
`workflows: write`, so a workflow on any branch an agent pushes can read
the Cloudflare token (which can redeploy app.fctl.sh) and
`SITE_DEPLOY_KEY` (which can push to fctl-site's `main`, and so change
`fctl.sh/install`).
- **This PR is the first half of the fix.** Once it's merged, an admin
moves those secrets into the `production` environment and limits the
environment to `main`. Workflows on other branches then can't read them.
- **Order matters.** Jobs in an environment can still read repository
secrets, so merging this first breaks nothing. Move the secrets
afterwards.

`docs/development.md` says where these secrets live.

## How I verified it

- actionlint 1.7.12 passes on `.github/workflows/`.
- The `deploy` job has run in `production` all along, so the
`environment:` key works with these workflows' permissions.
- `publish` runs from `main` (a `workflow_dispatch` on `main`), so a
`main`-only policy allows it, including `tag` rebuilds.
- Merging this runs `site-docs` (`docs/` changed), which checks the job
inside the environment.

Refs #22. Session: https://app.fctl.sh/s/ses_01M58A7MAFDWKZDCA239GR6H6G

## Related pull requests

Merge before the flip:
- #95: production secrets move into the production
environment
- hyperstructure/fctl-site#18: a security policy (any time)

Merge after the flip (drafts until then):
- #96: fctl stops using DESIGN_DEPLOY_KEY
- hyperstructure/fctl-site#17: fctl-site stops using DESIGN_DEPLOY_KEY
and FCTL_DEPLOY_KEY
- hyperstructure/design#12: README no longer says the repository is
private
- hyperstructure/sandbox#4: AGENTS.md no longer says fctl is private

Co-authored-by: fctl-sh[bot] <fctl-sh[bot]@users.noreply.github.com>
@kalaspuff
kalaspuff merged commit eec97a0 into main Oct 18, 2026
3 checks passed
@kalaspuff
kalaspuff deleted the fctl/47-security-policy branch October 18, 2026 20:56
kalaspuff pushed a commit to hyperstructure/fctl that referenced this pull request Oct 18, 2026
)

**Merge only after hyperstructure/design is public.** Until then `npm
ci` can't reach the design package without the key, so CI on this pull
request fails. Re-run it after the flip.

## What changes

- CI's `check`, `dev` and `deploy` jobs and Release's `publish` job stop
setting up `DESIGN_DEPLOY_KEY`.
- The `repo-access` action is now used only by `site-docs`, which pushes
fctl.sh's docs pin to fctl-site with `SITE_DEPLOY_KEY`. Its description
no longer talks about private repositories.
- `AGENTS.md`, `docs/development.md` and `ROADMAP.md` no longer say the
repositories are private. Moving `@hyperstructure/design` to npm stays
on the roadmap as its own item, but it isn't needed to drop the keys.

## Why no lockfile change

The lockfile records
`git+ssh://[email protected]/hyperstructure/design.git#<sha>`. For a GitHub
dependency, npm first downloads the commit's tarball over HTTPS
(codeload.github.com) and falls back to git only when that fails. For a
public repository, that download needs no sign-in.

I checked this with npm 10.9 and a public GitHub dependency
(`github:sindresorhus/is-plain-obj#v4.1.0`), with SSH disabled
(`GIT_SSH_COMMAND=/bin/false`) and no git config:
- `npm install` wrote a `git+ssh://` URL into the lockfile.
- `npm ci` from that lockfile succeeded.

`cargo xtask dev` installs with `npm ci` too.

## After merging

An admin deletes the `DESIGN_DEPLOY_KEY` secret here and the deploy key
on hyperstructure/design. fctl-site's matching change is linked below.

## Verified

- actionlint 1.7.12 passes.
- Before the flip, CI is expected to fail at `npm ci`.

Refs #22. Session: https://app.fctl.sh/s/ses_01M58A7MAFDWKZDCA239GR6H6G

## Related pull requests

Merge before the flip:
- #95: production secrets move into the production
environment
- hyperstructure/fctl-site#18: a security policy (any time)

Merge after the flip (drafts until then):
- #96: fctl stops using DESIGN_DEPLOY_KEY
- hyperstructure/fctl-site#17: fctl-site stops using DESIGN_DEPLOY_KEY
and FCTL_DEPLOY_KEY
- hyperstructure/design#12: README no longer says the repository is
private
- hyperstructure/sandbox#4: AGENTS.md no longer says fctl is private

Co-authored-by: fctl-sh[bot] <fctl-sh[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

1 participant