Skip to content

hookified - chore: defense - bootstrap Aikido Safe Chain for cloud agents - #185

Merged
jaredwray merged 2 commits into
mainfrom
cursor/defense-safe-chain-cloud-96ce
Aug 19, 2026
Merged

hookified - chore: defense - bootstrap Aikido Safe Chain for cloud agents#185
jaredwray merged 2 commits into
mainfrom
cursor/defense-safe-chain-cloud-96ce

Conversation

@jaredwray

Copy link
Copy Markdown
Owner

Summary

Bootstrap Aikido Safe Chain on Codespaces and Cursor Cloud Agents (section 2).

Status update: DEFENSE_IN_DEPTH.md: Safe Chain cloud bootstrap → (PR pending); CODEOWNERS → PR #184

Changes

  • Add scripts/setup-cloud-environment.sh (pinned Safe Chain installer, SHA-256 verified, --ci shims, frozen lockfile).
  • Add .devcontainer/devcontainer.json and .cursor/environment.json so both environments run the bootstrap.
  • Append the Safe Chain section to AGENTS.md.
  • Note the live Safe Chain control in SECURITY.md.

Verification

  • Bootstrap script copied from the skill (pinned version + installer digest)
  • Devcontainer and Cursor environment.json are valid JSON and invoke bash ./scripts/setup-cloud-environment.sh
  • AGENTS.md documents not bypassing shims

Reference: defense-in-depth-nodejs § 2

Please check if the PR fulfills these requirements

  • Followed the Contributing and Code of Conduct guidelines.
  • Tests for the changes have been added (for bug fixes/features) with 100% code coverage.

What kind of change does this PR introduce? (Bug fix, feature, docs update, ...)
chore / security

Open in Web Open in Cursor 

cursoragent and others added 2 commits August 19, 2026 17:33
Install Safe Chain shims in Codespaces and Cursor Cloud Agents
before any frozen-lockfile install.

Co-authored-by: Jared Wray <me@jaredwray.com>
Co-authored-by: Jared Wray <me@jaredwray.com>
@codecov

codecov Bot commented Aug 19, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 100.00%. Comparing base (0752116) to head (e0459a6).

Additional details and impacted files
@@            Coverage Diff            @@
##              main      #185   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files            5         5           
  Lines          433       433           
  Branches       109       109           
=========================================
  Hits           433       433           

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@jaredwray
jaredwray marked this pull request as ready for review August 19, 2026 17:36

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: e0459a6468

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

persist_shim_path() {
local rc="$1"
local line="export PATH=\"${SAFE_CHAIN_SHIMS}:${SAFE_CHAIN_BIN}:\$PATH\""
if [[ -f "$rc" ]] && grep -Fq ".safe-chain/shims" "$rc"; then

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Replace stale shim entries instead of skipping them

When an existing rc file merely mentions .safe-chain/shims—for example, in a commented/stale entry or an assignment that appends the directory after the existing PATH—this substring check returns without writing the canonical leading export. A subsequent shell can therefore resolve an unwrapped package manager ahead of the shim even though bootstrap succeeded; validate or replace the effective PATH assignment so the shim directory is first.

AGENTS.md reference: AGENTS.md:L73-L74

Useful? React with 👍 / 👎.

@jaredwray
jaredwray merged commit 2bc0f26 into main Aug 19, 2026
13 checks passed
@jaredwray
jaredwray deleted the cursor/defense-safe-chain-cloud-96ce branch August 19, 2026 19:44
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.

2 participants