Skip to content

Fix SecretSentry open issues for v3.0.8 - #23

Open
HallyAus wants to merge 10 commits into
mainfrom
fix/open-issues-2026-09-06
Open

HallyAus wants to merge 10 commits into
mainfrom
fix/open-issues-2026-09-06

Conversation

@HallyAus

@HallyAus HallyAus commented Sep 6, 2026

Copy link
Copy Markdown
Owner

Addresses #16, #21 and #22; #11 is also covered by the existing v3.0.7 Clear All Repairs flow and will be closed after verification.

  • Expose External URL Self-Check and URL settings in the options flow with URL validation.
  • Resolve nested secrets.yaml stores (including ESPHome) when validating !secret references.
  • Do not scan secrets.yaml itself as an inline-secret leak source.
  • Exclude Home Assistant/Nabu Casa managed .cloud credential state from user-remediable findings.
  • Align manifest ownership, repository links and version metadata to HallyAus/SecretSentry v3.0.8.

Raw secret values are still not retained in the scan context; only masked values and comparison hashes are stored.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Sep 6, 2026

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review Completed 2026-09-06T08:56:01.270270Z 927469b PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 927469bd95

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines +68 to +70
if user_input.get(CONF_ENABLE_EXTERNAL_CHECK):
parsed = urlparse(external_url)
if parsed.scheme not in {"http", "https"} or not parsed.netloc:

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge Keep external findings as Finding objects

When the newly exposed self-check is enabled with an http:// URL, this validation accepts it and check_external_url() creates a weak-TLS finding, but serializes it to a dictionary before the coordinator appends it to scan_result.findings. _update_repairs() then passes that mixed list to group_findings(), which accesses finding.rule_id and raises AttributeError, causing the coordinator refresh to fail whenever the check produces a finding. Preserve Finding instances for internal processing or deserialize the returned dictionaries before extending the scan result.

Useful? React with 👍 / 👎.

Comment on lines +326 to +329
secrets_map.setdefault(key, mask_secret(value))
secrets_raw_hashes.setdefault(
key, hash_for_comparison(value)
)

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Preserve secret-store scope during reference validation

When independent nested configurations contain their own secrets.yaml files, flattening every key into one global map lets a definition in an unrelated subtree satisfy any !secret reference. For example, a missing key referenced by packages/foo.yaml is considered available merely because esphome/secrets.yaml defines the same name; R004 checks only the global secrets_map key set and therefore suppresses the missing-secret finding. Track each store by directory and resolve references against the applicable file's local/ancestor store rather than merging all keys globally.

Useful? React with 👍 / 👎.

Comment on lines 392 to +394
filename = path.name
if filename.lower() == "secrets.yaml":
return True

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Continue scanning root secrets metadata for R060

When enable_secret_age is enabled, this unconditional exclusion prevents the root secrets.yaml from reaching any rule. R060SecretAge.evaluate_file_text() explicitly runs only when file_path == "secrets.yaml", so after this change the advertised secret-age check can never emit a finding. Exclude raw secret values from leak-oriented rules without removing the file from the rule pipeline needed by R060.

Useful? React with 👍 / 👎.

HallyAus commented Sep 6, 2026

Copy link
Copy Markdown
Owner Author

@codex address that feedback. Please fix all three review findings: keep external self-check findings as Finding objects internally, resolve !secret references only against the applicable local/ancestor secrets stores rather than a global flattened key set, and keep root secrets.yaml available to R060 secret-age checks while excluding it from leak-oriented rules. Add/update regression tests for each case.

@chatgpt-codex-connector

Copy link
Copy Markdown

To use Codex here, create an environment for this repo.

HallyAus commented Sep 6, 2026

Copy link
Copy Markdown
Owner Author

/apply-secretsentry-review-fixes

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.

1 participant