GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — fix(forks): detect secrets referenced from advanced-mode fields by icecrasher321 · Pull Request #6566 · simstudioai/sim

Conversation

@icecrasher321

@icecrasher321 icecrasher321 commented Aug 11, 2026

Copy link
Copy Markdown
Contributor

Summary

{{ENV}} detection in the fork reference scan shared one gate with
resource-id detection, so a secret referenced from an ACTIVE advanced
(manual) canonical member — e.g. a {{SLACK_CHANNEL}} typed into Slack's
advanced "Channel ID" — was never recorded as a reference.

Three consequences, all silent:

  • No row in the Secrets section of the fork edit-mapping modal, so the key
    could not be mapped across workspaces at all.
  • promote-plan builds unmappedRequired from the same scan, so the
    required-env sync gate never fired for it.
  • A push to a target missing that secret therefore succeeded, writing a
    {{KEY}} that resolves to nothing at runtime. The identical reference in
    a basic-mode field would have hard-blocked the same push.

Detection now gates on EXECUTION rather than ownership. A dormant member
and a condition-hidden field still go undetected — they never run, so they
must not become sync blockers — but an active manual member is exactly the
value that does run, and its key is a live secret reference like any other.

Resource-id detection keeps the verbatimManual policy unchanged, so a
hand-typed credential/KB id stays a user-owned escape hatch. This also
reconciles the two halves of the pass: remapEnvInValue already rewrote a
manual member's ref unconditionally while detection suppressed it.

Pins the fix with cases for explicit canonicalModes and the value
heuristic, rewrite/detect agreement on a mapped key, both still-undetected
paths, and the resource-id escape hatch surviving alongside env detection.

Type of Change

  • Bug fix

Testing

Tested manually

Checklist

  • Code follows project style guidelines
  • Self-reviewed my changes
  • Tests added/updated and passing
  • No new warnings introduced
  • I confirm that I have read and agree to the terms outlined in the Contributor License Agreement (CLA)

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

greptile-apps[bot] reacted with thumbs up emoji
All reactions
  • 👍 1 reaction
Vikhyath Mondreti
fix(forks): detect secrets referenced from advanced-mode fields
1326701
@vercel

vercel Bot commented Aug 11, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

1 Skipped Deployment
Project Deployment Actions Updated (UTC)
docs Skipped Skipped Aug 11, 2026 11:05pm

Request Review

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@cursor

cursor Bot commented Aug 11, 2026 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown

PR Summary

Medium Risk
Touches fork promote/sync reference detection for required env secrets, which gates cross-workspace pushes. The change is narrowly scoped and makes the gate stricter (safer), with solid regression coverage.

Overview
Fixes a silent fork-sync gap where {{ENV}} refs in active advanced/manual fields (e.g. Slack's Channel ID) were never recorded as mapping requirements.

Detection previously shared the resource-id ownership gate (verbatimManual), so rewrite and detect disagreed: the secret was rewritten but never surfaced in Secrets mapping or the required-env sync gate. Env detection now gates on execution only — dormant and condition-hidden fields stay skipped; active manual members are detected. Hand-typed resource ids keep their escape-hatch policy unchanged.

Reviewed by Cursor Bugbot for commit 1326701. Configure here.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@greptile-apps

greptile-apps Bot commented Aug 11, 2026

Copy link
Copy Markdown
Contributor

Greptile Summary

This PR fixes workspace-fork promotion scanning so environment variables referenced by active advanced-mode fields and their active dependents are treated as required mappings.

  • Separates environment-reference execution gating from the user-owned resource-ID policy.
  • Continues excluding dormant canonical members and condition-hidden fields.
  • Adds regression coverage for explicit and inferred advanced modes, mapped-key rewriting, inactive fields, and resource-ID escape hatches.

Confidence Score: 5/5

The PR appears safe to merge, with the revised reference scan matching canonical execution semantics and no actionable regressions identified.

Active advanced values and their dependents now contribute live environment-variable requirements, while dormant and condition-hidden values remain excluded and manual resource IDs retain their existing escape-hatch behavior.

Important Files Changed

Filename Overview
apps/sim/ee/workspace-forking/lib/remap/remap-references.ts Separates environment-variable detection from manual resource-ID suppression while retaining dormant and condition-hidden execution gates.
apps/sim/ee/workspace-forking/lib/remap/remap-references.test.ts Adds focused regression tests covering active, dormant, hidden, inferred-mode, mapped, and resource-ID coexistence cases.

Flowchart

%%{init: {'theme': 'neutral'}}%%
flowchart TD
  A[Inspect subblock value] --> B{Dormant or condition-hidden?}
  B -- Yes --> C[Do not record ENV reference]
  B -- No --> D[Record ENV reference]
  D --> E{Resolver maps key?}
  E -- Yes --> F[Rewrite to target ENV key]
  E -- No --> G[Add required unmapped reference]
  G --> H[Block promotion until mapped]
  A --> I{User-owned manual resource ID?}
  I -- Yes --> J[Keep resource ID verbatim]
Loading

Reviews (1): Last reviewed commit: "fix(forks): detect secrets referenced fr..." | Re-trigger Greptile

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@icecrasher321
icecrasher321 merged commit ec8b988 into staging Aug 11, 2026
30 checks passed

Uh oh!

There was an error while loading. Please reload this page.

@waleedlatif1
waleedlatif1 deleted the staging-v36 branch August 12, 2026 00:18
@waleedlatif1 waleedlatif1 mentioned this pull request Aug 12, 2026
v0.8.0: desktop app, workflow UI, v2 endpoints #6606
Merged

This branch was previously deployed

1 inactive deployment
Preview — 13267017 Deployed Aug 11, 2026 by vercel[bot]
View deployment
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

No reviews

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

1 participant

@icecrasher321
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.