Skip to content

Harden runtime boundaries and failure handling - #18

Merged
ZILECAO merged 4 commits into
mainfrom
zile/v12-security-audit
Sep 1, 2026
Merged

Harden runtime boundaries and failure handling#18
ZILECAO merged 4 commits into
mainfrom
zile/v12-security-audit

Conversation

@ZILECAO

@ZILECAO ZILECAO commented Aug 27, 2026

Copy link
Copy Markdown
Member

Summary

  • add shared request limits, operation leases, and one-time claims across web instances
  • bind terminal sessions, uploads, OAuth relays, and runtime changes to the current federated user and assigned instance
  • make provisioning, offboarding, and teardown fail closed during retries, races, partial AWS responses, and stale requests
  • limit SSM access to fixed deployment-owned documents and run user-controlled file and callback work as the unprivileged runtime user
  • validate auth settings, AWS responses, stream URLs, callback URLs, object metadata, and deployment targets at their boundaries
  • harden terminal reconnect, selection, clipboard, attachment, and cleanup behavior while keeping the normal workflow unchanged
  • document the public security model, privacy behavior, Identity Center setup, and release checks

Deployment note

The first deploy creates the Cognito foundation without an app client and prints the IAM Identity Center SAML values. After the operator adds the Identity Center metadata to the ignored local configuration, the second deploy creates the federated-only client and the rest of the service.

Verification

  • ./scripts/check.sh
    • frozen dependency install and bun audit with no known vulnerabilities
    • Prettier, ESLint, and TypeScript
    • 36 test files and 300 tests
    • production Next.js build
    • ShellCheck and CloudFormation lint
  • ./agentformation doctor
  • production Docker image build and container checks for /api/health, the root page, and non-root UID 1001
  • actionlint .github/workflows/checks.yml
  • Gitleaks history and final-diff scans

The branch contains one commit and does not deploy or change any AWS resources.

@ZILECAO
ZILECAO force-pushed the zile/v12-security-audit branch from cba4543 to 0e79328 Compare August 27, 2026 22:34
@ZILECAO
ZILECAO force-pushed the zile/v12-security-audit branch from 0e79328 to f22c1e1 Compare August 29, 2026 01:54
@ZILECAO

ZILECAO commented Sep 1, 2026

Copy link
Copy Markdown
Member Author

Final review complete at 8c1447bba8f639205c61efc7d42084c771dcfefa.

  • Fixed the CloudFormation boundary rollback/deletion deadlock without broadening IAM access.
  • Fixed full destroy so runtime stacks are deleted before the provisioning stack removes their service role.
  • Added executable regression coverage for both lifecycle failures.
  • ./scripts/check.sh passes: audit, formatting, lint, types, 39 test files / 309 tests, production build, ShellCheck, and cfn-lint.
  • GitHub checks web, infrastructure, and secrets pass.
  • The max-effort Claude review inspected the full patch and complete exact-head source and returned: LGTM 8c1447bba8f639205c61efc7d42084c771dcfefa.

Claude review record: https://github.com/BlockchainCap/monorepo/issues/528#issuecomment-5498172749

The live personal runtime was not deployed, stopped, restarted, or replaced during this final remediation.

@ZILECAO
ZILECAO merged commit cde0f55 into main Sep 1, 2026
3 checks passed
@ZILECAO
ZILECAO deleted the zile/v12-security-audit branch September 1, 2026 18:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant