Skip to content

fix(discovery): drop SecretTargetAttachment discovery and the $LATEST version pseudo-entry - #183

Merged
JeroenSoeters merged 2 commits into
mainfrom
jeroensoeters/discovery-sta-latest-hotfix
Aug 23, 2026
Merged

fix(discovery): drop SecretTargetAttachment discovery and the $LATEST version pseudo-entry#183
JeroenSoeters merged 2 commits into
mainfrom
jeroensoeters/discovery-sta-latest-hotfix

Conversation

@JeroenSoeters

Copy link
Copy Markdown
Contributor

Summary

  • Restore discoverable = false on AWS::SecretsManager::SecretTargetAttachment, with the reason recorded inline. CloudControl's list handler returns every secret in the account rather than actual attachments: the type is an action performed on a secret, not a cloud object with an inventory, so there is nothing to enumerate and reads of the listed ids fail. In any account holding secrets this failed a discovery sync command on every cycle. A custom list is not a viable alternative: the only signal that a secret carries an attachment lives inside the secret's value, which discovery must not read. The type remains fully declarable and manageable.
  • Exclude the $LATEST pseudo-version from AWS::Lambda::Version discovery at list time (same mechanism as the AWS-managed policy and reserved alias exclusions). CloudControl's version list includes $LATEST, but it is not a published version and reading it always fails; this was previously masked by the list post-filter dropping ARN-form results and surfaced once that was fixed. Published versions keep discovering.

Verification

  • Unit tests cover both exclusion behaviors; make build, make verify-schema, make test-unit, make lint all pass.
  • Both failure modes were reproduced against a live account (the attachment list returning plain secret ARNs; version reads failing only for $LATEST-suffixed ids). Targeted conformance for lambda-version and lambda-version-ref dispatched from this branch; results will be linked in a comment. The attachment type has no conformance fixture; its discovery test returns to skipping, as before the flag flip.

… version pseudo-entry

CloudControl's SecretTargetAttachment list returns every secret in the
account rather than actual attachments: the type is an action performed
on a secret rather than a cloud object with its own inventory, so there
is nothing to enumerate and reads of the listed ids fail. In any
account with secrets that failed a discovery sync command on every
cycle. The type goes back to discoverable = false, with the reason
recorded inline; it remains fully declarable and manageable.

CloudControl's Lambda version list includes the $LATEST pseudo-version,
which is not a published version and whose read always fails. This was
masked while the list post-filter dropped ARN-form results and surfaced
once that was fixed. The generic list path now skips it, the same way
AWS-managed policies and reserved aliases are skipped.
Neither SecretTargetAttachment discovery nor working Lambda version
listing ever shipped in a release, so the attachment type simply
leaves the unreleased enablement list and the version pseudo-entry
needs no fix note. What was released broken is version discovery
silently finding nothing, which gets the honest entry.
@JeroenSoeters
JeroenSoeters merged commit da590e1 into main Aug 23, 2026
8 checks passed
@JeroenSoeters
JeroenSoeters deleted the jeroensoeters/discovery-sta-latest-hotfix branch August 23, 2026 06:43
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