arc1-cursor-regression — independently scanned and version-tracked by SaferSkills.
SaferSkills independently audited arc1-cursor-regression (Agent Skill) and scored it 96/100 (green). The audit ran 55 deterministic rules across Security, Supply Chain, Maintenance, Transparency, and Community; it found 0 high-severity and 1 lower-severity findings. The full rule-by-rule trace and per-finding evidence are below. Free, methodology-open.
Findings & checks · 1 flagged
The text {match} tells the agent to skip the normal "ask the user first" gate. Used adversarially it removes the human-in-the-loop check before destructive or sensitive actions, turning a normally-gated agent into a fire-and-forget executor.
Every scanned point with the score it earned and what moved between them.
First recorded scan — no prior version to compare against.
The primary manifest — the file an agent reads to learn what this artifact does.
This skill creates tailored Cursor setup and prompts based on:
It must not output a hardcoded one-scenario checklist unless the user explicitly asks for that.
Use this skill when user asks for:
If the user asks in one message to:
then treat it as a single composite workflow:
Always bind generated config/scripts/prompts to the actual target repo root (not a remembered path).
Run:
git rev-parse --show-toplevel
git branch --show-current
git worktree list --porcelainRules:
/Users/.../DEV/arc-1 unless user explicitly requests that exact path.Before generating runtime prompts, ensure the Cursor chat session is attached to the same project/workspace that will host MCP servers and tool cache for the resolved root.
Rules:
Environment/session setup issue (not code regression) and provide a fix: open the correct workspace and reconnect MCP.Use one of:
Preferred commands:
gh pr view <PR> --json number,title,body,headRefName,baseRefName,url
gh pr diff <PR> --name-onlyFallback:
git diff --name-only origin/main...HEADExtract blockers from chat and turn them into guardrails (examples):
query vs sql)Map changed files to test modules:
src/server/server.ts, auth/preflight, startup behaviormodule_auth_preflightsrc/handlers/schemas.ts, TABLE_CONTENTS, validationmodule_schema_validationsrc/handlers/dispatch.ts + per-tool handlers, hints/scope/routing/diagnose actionsmodule_handler_behaviorsrc/adt/diagnostics.ts, dump/gateway/system message parsingmodule_diagnostics_runtimesrc/adt/http.ts login/html detection changesmodule_http_html_detectionsrc/handlers/hyperfocused.ts, src/handlers/tools.tsmodule_tool_visibilitymodule_static_verificationAlways include module_connectivity_precheck unless user requests static-only.
Default: command-mode MCP servers (most reliable in Cursor). Use URL mode only if user explicitly asks.
Generate only needed profiles for selected modules:
arc1-good for positive behaviorarc1-bad for auth-negative checks (only if auth/preflight module selected)arc1-good-blockdata, arc1-good-readonly, arc1-good-hyperfocused depending on module setPath/worktree requirements for generated config:
<root>/.cursor/scripts, they must compute root relative to script location, with ARC1_ROOT override.Use this when Cursor cannot read the hidden PR worktree because the active workspace or .cursorignore filters paths such as .claude/worktrees/....
Rules:
<cursor-workspace>/arc1-pr<nr>-visible, while keeping the MCP runtime pointed at the real PR worktree.
.env, caches, cookies, node_modules, or runtime foldersinto the static snapshot.
.arc1-pr<nr>-snapshot.json in the snapshot with source, visibleRoot,head, and createdAt so Cursor can report exactly what it reviewed.
staticRoot from runtimeRoot. Do not treata different active Cursor workspace as a regression when the prompt explicitly uses a readable snapshot plus a separate runtime root.
is at the active workspace root.
.cursor/ configs, prompts, scripts, and runtime files as localoperator artifacts. Do not commit them to ARC-1 unless the user explicitly asks for a reusable repository template with scrubbed, portable paths.
npm run build) unless user says skip.source full infra files blindly.${ARC1_ROOT}/.env (or ${ROOT}/.env after root resolution).ARC1_ENV_FILE.ARC1_EXPECT_DIST_TEXT; when set, fail startup ifthe expected text is missing from dist/handlers/dispatch.js. This catches stale MCP server builds before Cursor runs a long live regression.
ARC1_RUNTIME_FINGERPRINT env value in generated MCP profiles forbranch-specific runs, and tell the tester to restart/toggle MCP servers after changing config or rebuilding.
SAP_ALLOW_*) instead ofolder block flags, generated profiles must set the positive flags explicitly and unset legacy SAP_READ_ONLY / SAP_BLOCK_* / ARC1_PROFILE values so a root .env cannot silently override the intended test profile.
bash /path/to/script.sh or executable path), not sourced.grep '^KEY=' <file> | head -n1 | cut -d= -f2-When generating arc1-good.sh / arc1-good-btp-sim.sh, use this pattern:
#!/usr/bin/env bash
if [[ "${BASH_SOURCE[0]}" != "$0" ]]; then
echo "Do not source this script. Execute it: bash ${BASH_SOURCE[0]}"
return 1 2>/dev/null || exit 1
fi
set -euo pipefail
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
ROOT="${ARC1_ROOT:-}"
if [[ -z "$ROOT" ]]; then
if [[ -f "$SCRIPT_DIR/../../package.json" ]]; then
ROOT="$(cd "$SCRIPT_DIR/../.." && pwd)"
else
ROOT="$(git rev-parse --show-toplevel 2>/dev/null || true)"
fi
fi
[[ -n "$ROOT" ]] || { echo "Unable to resolve ARC-1 root. Set ARC1_ROOT=/absolute/path/to/arc-1"; exit 1; }
[[ -f "$ROOT/package.json" ]] || { echo "Invalid ARC1_ROOT: $ROOT (package.json missing)"; exit 1; }
[[ -f "$ROOT/dist/index.js" ]] || { echo "Missing build artifact: $ROOT/dist/index.js. Run: (cd \"$ROOT\" && npm run build)"; exit 1; }
if [[ -n "${ARC1_EXPECT_DIST_TEXT:-}" ]] && ! grep -Fq "$ARC1_EXPECT_DIST_TEXT" "$ROOT/dist/handlers/dispatch.js"; then
echo "Built dist is stale: expected text not found in dist/handlers/dispatch.js. Run: (cd \"$ROOT\" && npm run build)" >&2
exit 1
fi
ENV_FILE="${ARC1_ENV_FILE:-$ROOT/.env}"
[[ -f "$ENV_FILE" ]] || { echo "Missing env file: $ENV_FILE"; exit 1; }
getv() {
local key="$1"
local raw
raw="$(grep "^${key}=" "$ENV_FILE" | head -n1 | cut -d= -f2- || true)"
printf '%s' "$raw" | tr -d '\r' | sed -E "s/^[[:space:]]+|[[:space:]]+$//g; s/^['\"]//; s/['\"]$//"
}
export SAP_URL="${SAP_URL:-$(getv SAP_URL)}"
export SAP_USER="${SAP_USER:-$(getv SAP_USER)}"
export SAP_PASSWORD="${SAP_PASSWORD:-$(getv SAP_PASSWORD)}"
export SAP_CLIENT="${SAP_CLIENT:-$(getv SAP_CLIENT)}"
export SAP_LANGUAGE="${SAP_LANGUAGE:-EN}"
# Safe defaults — no writes, no data preview, no SQL. Uncomment the SAP_ALLOW_* lines
# below for developer-level access. See docs_page/authorization.md#recipes.
# export SAP_ALLOW_WRITES=true
# export SAP_ALLOW_DATA_PREVIEW=true
# export SAP_ALLOW_FREE_SQL=true
export SAP_TRANSPORT=stdio
[[ -n "${SAP_URL}" ]] || { echo "Missing SAP_URL in $ENV_FILE"; exit 1; }
[[ -n "${SAP_USER}" ]] || { echo "Missing SAP_USER in $ENV_FILE"; exit 1; }
[[ -n "${SAP_PASSWORD}" ]] || { echo "Missing SAP_PASSWORD in $ENV_FILE"; exit 1; }
node -e 'new URL(process.argv[1])' "$SAP_URL" >/dev/null || { echo "Invalid SAP_URL: [$SAP_URL]"; exit 1; }
unset SAP_READ_ONLY SAP_BLOCK_DATA SAP_BLOCK_FREE_SQL SAP_ENABLE_TRANSPORTS SAP_ENABLE_GIT
unset SAP_ALLOWED_OPS SAP_DISALLOWED_OPS ARC1_PROFILE ARC1_API_KEY
exec node "$ROOT/dist/index.js"For arc1-good-btp-sim.sh, add:
export SAP_SYSTEM_TYPE=btpWhen generating runnable instructions, always provide both:
1) Shell mode (user-run):
set -u are used in setup snippets, wrap setup in a subshell:( set -euo pipefail; ... )bash, never source.2) Codex mode (agent-run):
cd <resolved-root> && ...)..cursor/scripts/arc1-good.sh and .cursor/scripts/arc1-good-btp-sim.shbash -n syntax validation on generated scriptsWhen asked for runnable output, always return in this order:
For DDLS runtime checks in generated prompts:
Z_* -> ZI_* -> I_* with maxResults=100.DDLS/* candidate.Z_* has no DDLS.checkedCandidates is more likely non-empty.SAP_BASIS 758, CDS children projecting an amount field such as sflight-price may also need the currency field, otherwise activation fails before the feature under test is reached.
*-arc1-good, *-arc1-good-btp-sim) only as fallback.mcps/ scan.creating multi-object DDLS graphs. On CSRF/core-discovery/unlock/service-routing failure, stop the live mutation scenario and classify as environment/session, not product regression.
object exists, report partial-created, attempt at most one cleanup delete, and list leftovers explicitly if cleanup also fails.
Environment/session setup issue (not code regression) and suggest rebuild/reconnect on the correct root.Environment/session setup issue (descriptor staleness) rather than code regression.condition. Example: a read-only server may hide SAPWrite; a deny-action server may hide only the denied action instead of returning an in-band denial.
SAPQuery uses sql + maxRows.UP TO ... ROWS in SQL text unless backend-specific test intentionally checks parser rejection.Implemented fixes confirmedRegression foundEnvironment/session setup issue (not code regression)SAPRead(type="COMPONENTS") rows.Do not conflate separate installed components, for example S4FND 108 and MDG_FND 808.
DEVC $TMPfrom real DDLS impact rows. Do not count containers as dependent CDS objects.
static source excerpts unless static behavior failed.
(for example update guidance from SAPWrite(update), activation guidance from SAPActivate(ROOT), delete guidance from the first pre-cleanup root delete).
sections compact with empty arrays and one-line raw snippets.
Include these runtime checks when diagnostics files are touched:
action="dumps", bounded results)system_messages actiongateway_errors list and detail retrieval/Users/.../DEV/arc-1).cursor/ MCP configs or prompts with absolute local pathssource for runtime server scriptsdist/ or changing MCP envUNLOCK/CSRF/core-discovery failures as DDIC source-save problems~30 seconds. Free. No account. Every finding cites a rule and a line of evidence.