Skip to content

CFE-3293: Added tracking of secret variables for later redaction - #6304

Open
nickanderson wants to merge 1 commit into
cfengine:masterfrom
nickanderson:CFE-3293-accessor-split/master
Open

CFE-3293: Added tracking of secret variables for later redaction#6304
nickanderson wants to merge 1 commit into
cfengine:masterfrom
nickanderson:CFE-3293-accessor-split/master

Conversation

@nickanderson

@nickanderson nickanderson commented Aug 18, 2026

Copy link
Copy Markdown
Member

EvalContextVariableGet() always returned the plaintext value, so a caller had no
way to ask for a secret-tagged variable to be redacted. This adds a get_secret
parameter, plus EvalContextVariableGetPlaintext() and friends, and moves the 20
existing call sites in core onto the plaintext form.

No behaviour change: every call site asks for plaintext, exactly as before. It is
the groundwork for the CFE-3294 leak fixes, which switch selected sites over.

It also fixes an indexed read of a secret-tagged container (mydata[key]) aborting
in RvalContainerValue(): the declared type was reported while the returned value
was the redacted scalar sentinel. Not reachable until a caller passes
get_secret=false, which the CFE-3294 work does.

Needs paired changes in the enterprise and nova repos, which call these accessors
and will not compile against the new signature — enterprise/libcfserverd/server.c
and four sites in nova/cf-hub/cf-hub.c. All three need to land together:

@victormlg victormlg left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Nice! Some comments:

Comment thread libpromises/eval_context.c
Comment thread cf-agent/cf-agent.c
@victormlg

Copy link
Copy Markdown
Contributor

Please squash the two commits

I started a build:

Build Status

@nickanderson
nickanderson force-pushed the CFE-3293-accessor-split/master branch from 4d9f900 to 671d53f Compare August 21, 2026 14:42
@nickanderson

Copy link
Copy Markdown
Member Author

@cf-bottom jenkins, please

@cf-bottom

Copy link
Copy Markdown

@nickanderson nickanderson changed the title CFE-3293: make callers declare intent when reading a variable CFE-3293: Added tracking of secret variables for later redaction Aug 21, 2026
@nickanderson

Copy link
Copy Markdown
Member Author

@cf-bottom jenkins, please

@cf-bottom

Copy link
Copy Markdown

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

Labels

None yet

Development

Successfully merging this pull request may close these issues.

3 participants