Skip to content

fix(ai): keep parameter token secret out of task environments - #3414

Open
linuswong wants to merge 3 commits into
rocketride-org:developfrom
linuswong:fix/RR-3120-param-token-secret
Open

linuswong wants to merge 3 commits into
rocketride-org:developfrom
linuswong:fix/RR-3120-param-token-secret

Conversation

@linuswong

@linuswong linuswong commented Nov 21, 2026 •

Copy link
Copy Markdown

Summary

Keep RR_PARAM_TOKEN_SECRET out of task subprocess environments even when the operator opts in with a bare wildcard, a matching prefix, or the variable name. Use the existing constant for the denied environment name.

The regression test covers those opt-ins and case-insensitive matching. The changelog and security guide describe the exclusion. This is the engine change split out of #3122.

Validation

  • Six subprocess environment unit tests passed in isolation, including the regression test for the parameter token secret.
  • Git diff and pre-commit checks passed.

Summary by CodeRabbit

  • Bug Fixes
    • The parameter-token secret is now kept out of task subprocess environments, including when wildcard or explicit environment-variable opt-ins would otherwise include it, or when the variable name uses different capitalization. It also remains excluded when supplied without an opt-in.
  • Documentation
    • Updated security guidance to clarify which secrets are excluded when using a wildcard opt-in.

@coderabbitai

coderabbitai Bot commented Nov 21, 2026 •

Copy link
Copy Markdown
Contributor

Explain Change →

No actionable comments were generated in the recent review.

Walkthrough

Task subprocess filtering now excludes RR_PARAM_TOKEN_SECRET, including when RR_SUBPROCESS_ENV uses wildcard, prefix, or explicit-name opt-ins. Tests cover these cases. The security documentation and changelog describe the exclusion.

Changes: Task subprocess environment filtering

Layer / File(s) Summary
Add the parameter-token secret to the denylist
packages/ai/src/ai/modules/task/task_engine.py, packages/ai/tests/ai/modules/task/test_task_engine.py, docs/public/product/operate/security.md, CHANGELOG.md
The subprocess environment denylist includes RR_PARAM_TOKEN_SECRET. Tests cover wildcard, prefix, explicit-name, mixed-case, and no-opt-in cases. The security documentation and changelog describe the exclusion.

Estimated code review effort: 2 (Simple) | ~10 minutes

Change: Bug fix

Possibly related PRs

Suggested labels: module:ai, tests, docs, security

Merge Risk: Minimal · up to 524e3

This change keeps the parameter token secret out of task subprocess environments, including when operators opt in broadly. The change is small and has tests and documentation updates. No merge-blocking risk was found.

Pre-merge checks: Passed 4

Check name Status Explanation
Description Check Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check Passed The title names the main change: the parameter token secret (RR_PARAM_TOKEN_SECRET) is now kept out of task subprocess environments. The changeset matches this. It adds the secret to CONST_SUBPROCESS_…
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Full details: Title check

Explanation

The title names the main change: the parameter token secret (RR_PARAM_TOKEN_SECRET) is now kept out of task subprocess environments. The changeset matches this. It adds the secret to CONST_SUBPROCESS_ENV_NEVER in task_engine.py, so it is excluded even when a wildcard, prefix, or name opt-in in RR_SUBPROCESS_ENV would match it. The changelog, security docs, and tests cover the same behavior. The title uses the conventional fix(ai): prefix and is specific enough for a teammate scanning history.

Finishing Touches

Generate unit tests (beta)

  • Create a new PR
  • 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

Recent review info

Run configuration

Commits

Reviewing files that changed from the base of the PR and between 76451f1 and 524e382.

Files selected for processing: 1

  • CHANGELOG.md

Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 8 remain after this review.

@github-actions

Copy link
Copy Markdown
Contributor
🤖 Internal: Discord sync marker

Auto-managed by the Discord notification workflow. Stores the linked Discord message ID and forum thread ID. Do not edit or delete.

@github-actions github-actions Bot added docs Documentation module:ai AI/ML modules tests labels Nov 21, 2026

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

docs Documentation module:ai AI/ML modules tests

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant