diff --git a/.devcontainer.json b/.devcontainer.json index 7f199d5..30583e8 100644 --- a/.devcontainer.json +++ b/.devcontainer.json @@ -5,5 +5,5 @@ "dockerfile": "./Dockerfile" }, "runArgs": ["--network=${localEnv:DEVCONTAINER_NETWORK:bridge}"], - "postCreateCommand": "bun install" + "postCreateCommand": "bun install && curl -fsSL https://opencode.ai/install | bash" } diff --git a/Dockerfile b/Dockerfile index fb31318..42c0b0c 100644 --- a/Dockerfile +++ b/Dockerfile @@ -2,6 +2,7 @@ FROM oven/bun:slim RUN apt-get update && apt-get install -y --no-install-recommends \ git \ + openssh-client \ curl \ ca-certificates \ && rm -rf /var/lib/apt/lists/* @@ -9,5 +10,4 @@ RUN apt-get update && apt-get install -y --no-install-recommends \ # Switch to the non-root 'bun' user USER bun -# Install OpenCode AS the 'bun' user so it updates /home/node/.bashrc and installs locally -RUN curl -fsSL https://opencode.ai/install | bash +# postinstall adds deps + opencode cli, see .devcontainer.json diff --git a/README.md b/README.md index 0605897..233aa6d 100644 --- a/README.md +++ b/README.md @@ -58,3 +58,7 @@ If you don't have devpod, you can open the repo in Zed/VSCode and click "open in ## License Apache 2.0. Contributors must sign a Contributor License Agreement. You are free to use, modify, and distribute this software, including for commercial purposes, under the terms of the license. + +## Security + +See our [security checklist](docs/security.md) to understand how we protect this project and our users. diff --git a/bunfig.toml b/bunfig.toml new file mode 100644 index 0000000..08932ab --- /dev/null +++ b/bunfig.toml @@ -0,0 +1,2 @@ +[install] +minimumReleaseAge = 604800 diff --git a/docs/security.md b/docs/security.md new file mode 100644 index 0000000..920d408 --- /dev/null +++ b/docs/security.md @@ -0,0 +1,44 @@ +# Security Checklist + +Created April 21, 2026 by GPT 5.4-high +Reviewed April 21, 2026 by Atmosfearful + +## Identity And Access + +- [x] Publish through an npm organization, not a single personal account. +- [x] Require passkey 2FA for npm and GitHub admins. +- [x] Keep the maintainer/admin list small and review it regularly. + +## Branch Protection + +- [x] Protect `main` and require pull requests for changes. +- [x] Prevent direct pushes, force pushes, and branch deletion on `main`. +- [x] Require passing CI before merge. +- [x] Require signed commits. + +## Publishing Controls + +- [x] Publish only from CI, never from a maintainer workstation. +- [x] Use npm trusted publishing with GitHub Actions OIDC. +- [x] Do not use long-lived npm publish tokens. +- [x] Restrict publishing to the `npm` environment defined in the workflow. + +## Release Integrity + +- [x] Grant `id-token: write` only to the publish job. +- [x] Pin Bun and Node versions in CI. +- [x] Commit the lockfile and install with frozen lockfile mode. +- [x] Run the full test suite before any publish step. +- [x] Verify the actual npm tarball from `npm pack`, not just source execution. +- [x] Install and smoke-test the packed tarball under the runtime users actually use. +- [x] Fail the release if the tag version and `package.json` version do not match. + +## Supply chain +- [x] Enforce a 7-day minimum release age for newly resolved dependencies via `bunfig.toml`. +- [x] This package does not use consumer lifecycle scripts such as `postinstall`. +- [x] Bun does not execute installed dependency lifecycle scripts by default. + +## Artifact Trust + +- [x] Publish npm packages with `npm publish --provenance`. +- [x] Attach checksums for standalone binaries and other release artifacts.