Skip to content

ci: add readme-based integration audit workflow - #5807

Merged
maheshkutty merged 17 commits into
developfrom
feat/int-7434-integration-audit
Nov 20, 2026
Merged

maheshkutty merged 17 commits into
developfrom
feat/int-7434-integration-audit

Conversation

@maheshkutty

@maheshkutty maheshkutty commented Nov 19, 2026 •

Copy link
Copy Markdown
Contributor

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 the versions.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.

Job Secrets Does
filed (tickets on) Linear Reads the items already on each integration's audit tickets, archived ones included
audit Cursor One cursor-agent call per integration, inside a locked-down container; uploads the findings
tickets Linear, Slack Validates the findings again, plans and applies tickets, posts to Slack

Scripts (.github/scripts/integrations_audit/, TypeScript run with tsx)

  1. readme.ts reads 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.
  2. filed-items.ts writes each integration's filed items (key and title) for the agent.
  3. run.ts calls cursor-agent -p --force --trust --output-format json once 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 is invalid_output. For a change that is already filed, the agent sets sameAs to that item's key, even when it words or categorises it differently.
  4. plan-tickets.ts turns 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.
  5. create-tickets.ts applies the plan through linearApi.js:
    • one parent per integration per round: <Integration> – Integration Audit DD/MM/YYYY, reused while open
    • at most one open subticket per type (versionUpgrade, authFeature, mappingFeature, other); new items are appended with a comment, and priority and due date move to the most urgent item
    • an item already on any audit ticket of that integration (open, closed, canceled or archived) is skipped; archived tickets never get new items
    • KTLO on all tickets, VersionUpgrade on versionUpgrade subtickets, Integrations: Maintenance project
    • a Linear error fails that integration instead of being read as "no ticket", so outages don't create duplicates
  6. slack-message.ts builds the message posted after every run to the version audit's channel:
    • ✅ completed: integrations audited, integrations with new or updated tickets (each linked to its parent ticket, at most 10 shown), items already filed
    • ⚠️ completed with gaps: also lists the integrations not audited and their reason, with the value to paste into integrations for a manual rerun
    • ❌ failed: any job failed, including when no integration could be audited (key, usage limit or CLI problem)

Dispatch 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.

Input Default
create_tickets on Off = plan only, shown in the run summary
integrations all Comma-separated folder names
lookback_days 62 Covers the 2-month schedule
model empty Cursor model; empty keeps Cursor's default (Auto routing)
timeout_sec 300 Time limit per integration; raise it to rerun integrations that timed out

Artifacts (findings, plan, tickets) are kept 14 days; the filed items passed between jobs, 1 day.

linearApi.js: adds findIssuesByTitle (one GraphQL request, archived issues included, throws on error) and createComment. Existing functions are unchanged.

integrations_version_audit.yml and versions.json are 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

  • Agent isolation: the job that runs the agent holds only the Cursor key. It can't reach the Linear or Slack keys by editing scripts or tools, because those jobs use their own checkout and install.
  • Agent container: the agent runs in an image built from .github/scripts/integrations_audit/Dockerfile (node:22.23.4-bookworm pinned by digest, the Cursor CLI and the audit tools installed as root, run as node): a non-root user, every capability dropped, no-new-privileges, a read-only root filesystem (tmpfs for /tmp and home), the checkout read-only and only audit-out writable, --pids-limit 512 --memory 4g and --init, as other RudderStack workflows that run containers do. So a prompt-injected agent can't reach ACTIONS_RUNTIME_TOKEN (Actions cache writes), the code of later steps, or host sudo. harden-runner's disable-sudo-and-containers isn't used: it applies from job start and would also block this container.
  • Untrusted output: findings are validated again in the tickets job. 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.
  • Agent environment: the agent gets PATH, HOME, USER, SHELL, TMPDIR, LANG and CURSOR_API_KEY only, so not GITHUB_ENV/GITHUB_OUTPUT. The key is masked in everything written to the artifacts.
  • Agent permissions: .cursor/cli.json denies writes to src/**, .github/** and audit-out/** and the env/printenv commands. Shell stays open (feeds, grep) so output quality isn't limited. CLAUDE.md, AGENTS.md and the Claude Code hooks file are removed from the throwaway checkout.
  • Downloads: the Cursor CLI is a pinned release, checked in the Dockerfile against the sha256 Cursor publishes next to the tarball (Cursor ships no package Dependabot can track, so the Dockerfile notes how to bump it). tsx and @linear/sdk install with npm ci --ignore-scripts from their own lockfile in .github/scripts/integrations_audit/, which Dependabot's npm entry now covers.
  • Workflow basics: permissions: {}, contents: read per job, every action pinned to a SHA (new: actions/download-artifact v8.0.2, node24), harden-runner first in every job, persist-credentials: false, inputs only through env:, concurrency group and per-job timeouts.

Scanners

  • actionlint 1.7.7: no findings.
  • zizmor 1.30.1 on the workflow: no findings. On dependabot.yml: 3 × dependabot-cooldown on 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:

no security group for all: github-actions
no security group for all: npm
majors not grouped: github-actions
majors not grouped: docker
cooldown under 7 days: github-actions
cooldown under 7 days: docker
cooldown under 7 days: npm
no RudderStack cooldown exclude: github-actions
no RudderStack cooldown exclude: npm
no name-only rudderstack/* ignore: docker
.github/workflows/build-pr-artifacts.yml: job build-transformer-image
.github/workflows/build-pr-artifacts.yml: job build-user-transformer-image
.github/workflows/build-pr-artifacts.yml: job run-ingestion-service-test
.github/workflows/dt-test-and-report-code-coverage.yml: job notify
.github/workflows/live-integration-tests.yml: job live
.github/workflows/prepare-for-staging-deploy.yml: job build-transformer-image
.github/workflows/prepare-for-staging-deploy.yml: job build-user-transformer-image

Testing

  • .github/scripts/integrations_audit/*.test.ts: 27 Jest tests, run under both Jest configs; tsc --strict clean.
    • Tickets against an in-memory Linear: first run, re-run is a no-op, append with priority escalation, new type, closed and archived tickets, similar titles, Linear error isolation.
    • Keys: a matched repeat keeps its key; a new change from a used link gets its own key; two changes from one link in a run are both kept; filed items read back from tickets.
    • Runner: cursor-agent arguments and output, findings validation, minimal agent environment, key masking.
    • Untrusted findings: unknown files, findings of another integration, unknown statuses and broken JSON are not trusted.
    • Slack message: completed, completed with gaps (rerun input), failed.
  • End-to-end with act (Docker), one job, Reddit, against real Linear and Slack. The agent was a local stand-in for cursor-agent, because the local Cursor key was over its usage limit.
    • First run: created a parent and subtickets.
    • Next runs: the agent matched every repeat to its filed key (reworded and recategorised ones too), so they were skipped.
    • Two new changes from links already used on filed items were filed as new items.
    • The Slack message posted to the channel.
  • Not run end to end: the three-job layout. act can't pass artifacts between jobs, and the workflow can only be dispatched once it is on develop. The first dispatch should use one or two integrations.

Any changes to existing capabilities/behaviour, mention the reason & what are the changes ?

No. New workflow; linearApi.js changes are additive, and dependabot.yml only adds the audit tools folder to the npm entry.

Any new dependencies introduced with this change?

tsx 4.19.2 for the audit scripts, in their own lockfile; not added to the repo's dependencies. @linear/sdk is 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_sec per integration (default 300), 180-minute timeout for the audit job. 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

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
@maheshkutty
maheshkutty requested review from a team as code owners November 19, 2026 12:29
@coderabbitai

coderabbitai Bot commented Nov 19, 2026 •

Copy link
Copy Markdown
Contributor

Important

Review skipped

Auto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Repository UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 8c3adbdc-ff6c-4895-8380-b28ad64d9139

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • Trigger review
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

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

codecov Bot commented Nov 19, 2026 •

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 62.19313% with 231 lines in your changes missing coverage. Please review.
✅ Project coverage is 92.05%. Comparing base (b7adc40) to head (16f7f19).
⚠️ Report is 1 commits behind head on develop.

Files with missing lines Patch % Lines
.github/scripts/integrations_audit/run.ts 41.86% 72 Missing and 3 partials ⚠️
.github/scripts/integrations_audit/plan-tickets.ts 50.37% 59 Missing and 7 partials ⚠️
...ithub/scripts/integrations_audit/create-tickets.ts 62.96% 37 Missing and 3 partials ⚠️
.github/scripts/integrations_audit/readme.ts 82.75% 18 Missing and 2 partials ⚠️
.github/scripts/integrations_audit/filed-items.ts 46.42% 15 Missing ⚠️
...github/scripts/integrations_audit/slack-message.ts 82.97% 8 Missing ⚠️
.github/scripts/integrations_audit/common.ts 86.00% 7 Missing ⚠️
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.
📢 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.

…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 krishna2020 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

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
@sonarqubecloud

Copy link
Copy Markdown

@maheshkutty
maheshkutty merged commit ce5ace2 into develop Nov 20, 2026
38 checks passed
@maheshkutty
maheshkutty deleted the feat/int-7434-integration-audit branch November 20, 2026 12:08
maheshkutty added a commit that referenced this pull request Nov 23, 2026
## 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)
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