Repository navigation
ci: add readme-based integration audit workflow - #5807
Conversation
Audit partner changelogs against the audit sections of each integration README with one Cursor call per integration, then create or update one Linear parent per integration with a subticket per change type. Dispatch inputs choose the branch and whether tickets are created. Co-Authored-By: Claude Opus 5.5 <[email protected]> 🔒 Scanned for secrets using gitleaks 8.30.1
|
Important Review skippedAuto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the
|
Co-Authored-By: Claude Opus 5.5 <[email protected]> 🔒 Scanned for secrets using gitleaks 8.30.1
Share the change taxonomy, helpers and ticket item format in common.js, return one record per API from the README parser, key README items on the API and version, read Linear issues in one request, apply tickets a few integrations at a time, and report Cursor's API time instead of tokens it does not provide. Co-Authored-By: Claude Opus 5.5 <[email protected]> 🔒 Scanned for secrets using gitleaks 8.30.1
Deny file writes and shell through .cursor/cli.json, drop the repo's agent instruction files from the CI checkout, pass --trust, and add an optional model input (empty keeps Cursor's default Auto routing). Co-Authored-By: Claude Opus 5.5 <[email protected]> 🔒 Scanned for secrets using gitleaks 8.30.1
Blocking all shell and writes could lower audit quality (curl a feed, grep the code, keep scratch files). Deny only writes to src/ and .github/, which later steps read, and printing the environment. Co-Authored-By: Claude Opus 5.5 <[email protected]> 🔒 Scanned for secrets using gitleaks 8.30.1
The Cursor installer now puts cursor-agent in ~/.local/bin; ~/.cursor/bin is no longer created. Co-Authored-By: Claude Opus 5.5 <[email protected]> 🔒 Scanned for secrets using gitleaks 8.30.1
A new or changed auth method is a breaking change for an integration even before it adopts it, so the agent must not skip it as unused. Co-Authored-By: Claude Opus 5.5 <[email protected]> 🔒 Scanned for secrets using gitleaks 8.30.1
The repo Jest config collects every *.test.js, and node:test's test() fails inside Jest. Use Jest's test global; node:assert still works. Co-Authored-By: Claude Opus 5.5 <[email protected]> 🔒 Scanned for secrets using gitleaks 8.30.1
Typed modules with import/export, run in CI with a pinned tsx (installed alone, like @linear/sdk). Tests are *.test.ts and run under both Jest configs; no repo config changes. Co-Authored-By: Claude Opus 5.5 <[email protected]> 🔒 Scanned for secrets using gitleaks 8.30.1
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## develop #5807 +/- ##
===========================================
- Coverage 92.49% 92.05% -0.45%
===========================================
Files 742 749 +7
Lines 41358 41969 +611
Branches 9738 9904 +166
===========================================
+ Hits 38254 38634 +380
- Misses 2843 3059 +216
- Partials 261 276 +15 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
…t agent Dedupe: - filed-items.ts reads the items already on an integration's audit tickets (archived ones too) and the agent sets `sameAs` to the key of a filed item that describes the same change. - A new change from an already used announcement link gets the category, then the title, added to its key, so it is no longer dropped. Runs: - Slack message after every run, in the version audit's channel: counts, linked parent tickets, integrations not audited with a ready rerun input. - timeout_sec input; the audit step fails when no integration was audited. Security: - Three jobs: only the Cursor key where the agent runs; Linear and Slack keys in jobs that read the agent's output as validated data. - The agent gets a minimal environment; its key is masked in artifacts. - Cursor CLI pinned and checked against its published sha256; tsx and @linear/sdk from their own lockfile with npm ci (covered by Dependabot). Co-Authored-By: Claude Opus 5.5 <[email protected]> 🔒 Scanned for secrets using gitleaks 8.30.1
- One parser for ticket items: dedupe and the agent's filed list see the same keys, including items reworded by hand. - filed-items.ts reuses run.ts parseArgs; RUN_STATUSES and readJson are shared from common.ts. - The sameAs check moves out of the new-change key helper. - The Slack step sets JOB_STATUS directly. Co-Authored-By: Claude Opus 5.5 <[email protected]> 🔒 Scanned for secrets using gitleaks 8.30.1
- Same schedule as the Integration Version Audit; a scheduled run audits every integration on develop with tickets on. - Lookback default 62 days, so runs 2 months apart leave no gap. - Findings and results artifacts are kept 14 days. Co-Authored-By: Claude Opus 5.5 <[email protected]> 🔒 Scanned for secrets using gitleaks 8.30.1
Archived audit tickets still count as filed (Linear archives closed issues automatically), but a deleted ticket means its items are no longer filed. Linear returns trashed issues with includeArchived, so they are filtered out. Co-Authored-By: Claude Opus 5.5 <[email protected]> 🔒 Scanned for secrets using gitleaks 8.30.1
krishna2020
left a comment
There was a problem hiding this comment.
Security pass on the audit workflow. The secret split works; three things to change, inline.
Review follow-ups: - The agent runs in a container (non-root, no capabilities, checkout read-only, only audit-out writable, only the Cursor key), so a prompt-injected agent can't reach ACTIONS_RUNTIME_TOKEN, the code of later steps or host sudo. - Agent title, summary, affects and target version are made one line without backticks and capped, in the audit and again in the ticket job; announcement URLs can't contain spaces or backticks. Item keys are read only from the line right under an item, so free text can't forge one. - The ref input is removed: a run uses the branch it is started from (this repo's branches only), develop for the schedule. Co-Authored-By: Claude Opus 5.5 <[email protected]> 🔒 Scanned for secrets using gitleaks 8.30.1
- Agent container: read-only root with tmpfs for /tmp and home, process and memory limits, and an init process, as other RudderStack workflows that run containers do. - The agent sometimes writes `sameAs` as "<key>: <title>"; the planner now matches the longest filed key it starts with, and the prompt asks for the key only. Before, such a repeat was filed again. Co-Authored-By: Claude Opus 5.5 <[email protected]> 🔒 Scanned for secrets using gitleaks 8.30.1
The agent's environment is one image: the pinned node base, the pinned Cursor CLI (checked against its published sha256) and the audit tools from their lockfile, installed as root and run as node. The audit job builds it and runs it with the same lockdown flags, instead of setting up Node, npm and the Cursor CLI on the runner and mounting them in. Only cursor-agent is linked onto PATH: the CLI bundles its own node, which would otherwise replace the image's. Co-Authored-By: Claude Opus 5.5 <[email protected]> 🔒 Scanned for secrets using gitleaks 8.30.1
- run.ts defaults to a 62-day lookback; the workflow passes the lookback and timeout only when set, so each default lives in one place. - Agent findings are cleaned once, in the ticket job (the trust boundary); the audit job keeps the agent's raw answer. - One form for optional fields in cleanFindings; stale and duplicate comments removed. Co-Authored-By: Claude Opus 5.5 <[email protected]> 🔒 Scanned for secrets using gitleaks 8.30.1
|
## What are the changes introduced in this PR? Removes the old **Integration Version Audit**. The README-based **Integration Audit** (#5807, now on develop) replaces it. - `.github/workflows/integrations_version_audit.yml`: the old workflow (same 2-month schedule as the new one, so both would run on the same day) - `.github/scripts/versions.json`: the version list it checked - `.github/scripts/integrations_version_audit_plan.md`: the plan its agent followed - `.github/scripts/linearApi.js`: removes the helpers only the old agent used (state, user and cycle lookups, master-ticket and subticket searches). It keeps what the Integration Audit uses: `createIssue`, `updateIssue`, `createComment`, `findIssuesByTitle` and the project and label IDs. - `src/cdk/v2/destinations/movable_ink/README.md`: no longer points at `versions.json`. ## What is the related Linear task? Part of INT-7434 ## Please explain the objectives of your changes below The old audit only checked API versions listed in `versions.json`. The new one checks every partner change against each integration's README, so `versions.json` and the old workflow are no longer needed. Keeping both would file overlapping tickets on the same day. ### Testing - No remaining references to the removed files or functions in the repo. - The Integration Audit tests pass (29/29), and the trimmed `linearApi.js` still exports everything `create-tickets.ts` uses. ### Any changes to existing capabilities/behaviour, mention the reason & what are the changes ? The old version audit no longer runs. Its tickets already in Linear are not touched. ### Any new dependencies introduced with this change? N/A ### Any new generic utility introduced or modified. Please explain the changes. N/A ### Any technical or performance related pointers to consider with the change? N/A <hr> ### Developer checklist - [x] My code follows the style guidelines of this project - [x] **No breaking changes are being introduced.** - [x] All related docs linked with the PR? - [x] All changes manually tested? 🤖 Generated with [Claude Code](https://claude.com/claude-code)



What are the changes introduced in this PR?
A new Integration Audit workflow (
.github/workflows/integrations_audit.yml, every 2 months on the 1st at 09:00 UTC like the version audit, and manually) that replaces theversions.json-based version check with the integration READMEs as the source, and covers every kind of partner change: version upgrades, auth, endpoint lifecycle, fields and mappings, limits, new capabilities.Jobs. The audit agent reads untrusted partner pages and has a shell, so it runs in its own job with only the Cursor key. The Linear and Slack keys live in the other jobs, which use a fresh checkout and read the agent's output as data only.
filed(tickets on)auditcursor-agentcall per integration, inside a locked-down container; uploads the findingsticketsScripts (
.github/scripts/integrations_audit/, TypeScript run withtsx)readme.tsreads the fixed-format audit sections (## Version Information,### Changelog References) of every integration README. A README that doesn't follow the format is listed as skipped.filed-items.tswrites each integration's filed items (key and title) for the agent.run.tscallscursor-agent -p --force --trust --output-format jsononce per integration, with that integration's README sections and filed items as input, a time limit, and a minimal environment. The agent ends with a fixed JSON block; output that doesn't match isinvalid_output. For a change that is already filed, the agent setssameAsto that item's key, even when it words or categorises it differently.plan-tickets.tsturns findings into a ticket plan in code: change category → subticket type, priority and due date from the effective date (same thresholds as the version audit), plus version items the README states (deprecated, sunset, upgrade needed). Keys: a matched repeat keeps the filed key; a new change from an already used announcement link gets its category (then its title) added, because one announcement can carry several changes.create-tickets.tsapplies the plan throughlinearApi.js:<Integration> – Integration Audit DD/MM/YYYY, reused while openversionUpgrade,authFeature,mappingFeature,other); new items are appended with a comment, and priority and due date move to the most urgent itemversionUpgradesubtickets, Integrations: Maintenance projectslack-message.tsbuilds the message posted after every run to the version audit's channel:integrationsfor a manual rerunDispatch inputs. The branch is the one the run starts from (the "Use workflow from" picker; this repo's branches only). A scheduled run uses develop and the defaults: every integration, tickets on.
create_ticketsintegrationslookback_daysmodeltimeout_secArtifacts (findings, plan, tickets) are kept 14 days; the filed items passed between jobs, 1 day.
linearApi.js: addsfindIssuesByTitle(one GraphQL request, archived issues included, throws on error) andcreateComment. Existing functions are unchanged.integrations_version_audit.ymlandversions.jsonare untouched; they get removed once this workflow has run for a round.What is the related Linear task?
Part of INT-7434
Please explain the objectives of your changes below
Auth changes (HubSpot, Marketo, Zendesk) went unnoticed because the version audit only looked at API versions from
versions.json. This checks all partner changes against what each README says the integration uses.Security
.github/scripts/integrations_audit/Dockerfile(node:22.23.4-bookwormpinned by digest, the Cursor CLI and the audit tools installed as root, run asnode): a non-root user, every capability dropped,no-new-privileges, a read-only root filesystem (tmpfs for/tmpand home), the checkout read-only and onlyaudit-outwritable,--pids-limit 512 --memory 4gand--init, as other RudderStack workflows that run containers do. So a prompt-injected agent can't reachACTIONS_RUNTIME_TOKEN(Actions cache writes), the code of later steps, or hostsudo. harden-runner'sdisable-sudo-and-containersisn't used: it applies from job start and would also block this container.ticketsjob. Integration names, README paths and titles come from the checkout, not from the findings, and Slack text is escaped. Agent text is made one line without backticks and length-capped, and item keys are read only from the line right under an item, so free text can't forge a dedupe key.PATH,HOME,USER,SHELL,TMPDIR,LANGandCURSOR_API_KEYonly, so notGITHUB_ENV/GITHUB_OUTPUT. The key is masked in everything written to the artifacts..cursor/cli.jsondenies writes tosrc/**,.github/**andaudit-out/**and theenv/printenvcommands. Shell stays open (feeds, grep) so output quality isn't limited.CLAUDE.md,AGENTS.mdand the Claude Code hooks file are removed from the throwaway checkout.tsxand@linear/sdkinstall withnpm ci --ignore-scriptsfrom their own lockfile in.github/scripts/integrations_audit/, which Dependabot's npm entry now covers.permissions: {},contents: readper job, every action pinned to a SHA (new:actions/download-artifactv8.0.2, node24), harden-runner first in every job,persist-credentials: false, inputs only throughenv:, concurrency group and per-job timeouts.Scanners
actionlint1.7.7: no findings.zizmor1.30.1 on the workflow: no findings. Ondependabot.yml: 3 ×dependabot-cooldownon the existing entries (see below).Dependabot repo check (whole repo). Every line is on files this PR doesn't change, so they are left for a separate PR because they change update cadence and image builds for the whole repo:
Testing
.github/scripts/integrations_audit/*.test.ts: 27 Jest tests, run under both Jest configs;tsc --strictclean.cursor-agentarguments and output, findings validation, minimal agent environment, key masking.act(Docker), one job, Reddit, against real Linear and Slack. The agent was a local stand-in forcursor-agent, because the local Cursor key was over its usage limit.actcan't pass artifacts between jobs, and the workflow can only be dispatched once it is ondevelop. The first dispatch should use one or twointegrations.Any changes to existing capabilities/behaviour, mention the reason & what are the changes ?
No. New workflow;
linearApi.jschanges are additive, anddependabot.ymlonly adds the audit tools folder to the npm entry.Any new dependencies introduced with this change?
tsx4.19.2 for the audit scripts, in their own lockfile; not added to the repo's dependencies.@linear/sdkis the version the repo already uses.Any new generic utility introduced or modified. Please explain the changes.
N/A
Any technical or performance related pointers to consider with the change?
Agent concurrency 4,
timeout_secper integration (default 300), 180-minute timeout for theauditjob. A Cursor call took 49–145 s in tests, so a full run of ~120 integrations should take about 45 minutes. The ticket step handles 4 integrations at a time.Developer checklist
My code follows the style guidelines of this project
No breaking changes are being introduced.
All related docs linked with the PR?
All changes manually tested?
🤖 Generated with Claude Code