Skip to content

Commit 5827092

Browse files
committed
docs(security): mark the orchestration_debug CodeQL alert as a documented false positive (aws-samples#247 PR aws-samples#373)
User chose to leave the HIGH py/clear-text-logging-sensitive-data alert red + document it (it's a dev-only debug printer; logs only ids + a yes/no oauth-present flag, never the secret value). Keep the key-presence check ('in m' — secret value never read) but correct the comment: CodeQL still flags it because it taints the whole stdin dict and follows any s(m,…) read into a print. Documented in PR aws-samples#373's 'before merge' list for a maintainer to dismiss.
1 parent 93a486d commit 5827092

1 file changed

Lines changed: 8 additions & 9 deletions

File tree

scripts/orchestration_debug.py

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -48,16 +48,15 @@ def main():
4848

4949
for m in meta:
5050
n = m.get("child_count", {}).get("N", "?")
51-
# Never print the OAuth secret ARN/value — only WHETHER one is present.
52-
# Test KEY PRESENCE (``in``) rather than reading the value with
53-
# ``.get(...)``: the secret ARN string is never accessed, so it can't be
54-
# logged and CodeQL's clear-text-logging-of-secrets taint never starts.
51+
# Print ONLY whether an OAuth secret is present, never its value — and
52+
# test key PRESENCE (``in``) so the secret ARN string is never even read.
53+
# NOTE: CodeQL's py/clear-text-logging-sensitive-data still flags the
54+
# prints below because it taints the whole stdin-derived meta dict as
55+
# sensitive and follows any ``s(m, …)`` read into a print — a false
56+
# positive (this dev-only debug helper logs only ids + a yes/no flag).
5557
has_oauth = "yes" if "linear_oauth_secret_arn" in m else "no"
56-
parent_issue = s(m, "parent_linear_issue_id")
57-
repo = s(m, "repo")
58-
user = s(m, "platform_user_id")
59-
print(f" PARENT issue={parent_issue} repo={repo} children={n}")
60-
print(f" release_ctx: user={user} oauth={has_oauth}")
58+
print(f" PARENT issue={s(m, 'parent_linear_issue_id')} repo={s(m, 'repo')} children={n}")
59+
print(f" release_ctx: user={s(m, 'platform_user_id')} oauth={has_oauth}")
6160

6261
for k in sorted(kids, key=lambda i: s(i, "linear_identifier")):
6362
st = s(k, "child_status")

0 commit comments

Comments
 (0)