Repository navigation
Use placeholder fake keys in cloud URL tests - #17
Conversation
The plugin scanner flags the fake API key literal in the cloud URL tests as a HIGH HARDCODED_SECRET. Rename the fake values to placeholder-style names ending in "example" so the scanner recognizes them. The cog_ prefix is kept for the service key.
TheOnlyFusionCube
left a comment
There was a problem hiding this comment.
Reviewed against current main. This only replaces two synthetic credential literals in tests/cloud-url.test.mjs; it retains the cog_ service-key prefix and leaves test semantics and HOL scanner policy unchanged. The PR's Test matrix and HOL Plugin Scanner both passed; scanner reports zero high findings (100/100). Merging this first will remove the pre-existing scanner finding that also affects #19 and #20.
TheOnlyFusionCube
left a comment
There was a problem hiding this comment.
Approved. The diff changes only two synthetic credentials in tests/cloud-url.test.mjs; neither endpoint validation nor the malicious-URL matrix, assertion logic, or workflows/scanner configuration changes. Both literals remain nonempty, and cog_service_example retains the cog_ prefix used by getCloudConfig to select the service-key path. For each malicious URL, the test still requires create/get/message calls plus service-key create to reject, and withMockedFetch still asserts calls.length === 0 (no credential-bearing fetch can be attempted).
Verified on the PR head: Test passed on Node 18/20/22 (68/68 each); HOL Plugin Scanner 3.4.2 completed successfully, reporting 0 critical/high/medium/low/info findings and score 100/100. Existing scanner gates remain min_score: 80 and fail_on_severity: high; there is no evidence of relaxed security thresholds or reduced regression coverage. The default branch's earlier scanner run still has one HIGH finding, so confirm new main checks after merge.
The HOL plugin scanner (3.4.2,
fail_on_severity: high) reports one HIGHHARDCODED_SECRETfinding on main: the fake API key intests/cloud-url.test.mjsline 19. It came from my PR #11.This renames the two fake key literals in that file to placeholder-style values the scanner recognizes:
apk_secret_exampleandcog_service_example. Thecog_prefix is kept, so service-key detection is unchanged. No scanner thresholds, workflow files or ignore files are touched, and the test logic is unchanged.Verified:
node --testpasses 68/68 before and after.check_no_hardcoded_secretsreturns the line 19 finding on main and no findings on this branch.