Skip to content

refactor(security): clear widget containers without innerHTML, rename secret-named constants - #1109

Open
rubenvdlinde wants to merge 2 commits into
developmentfrom
quality/gap-9-securecoding
Open

rubenvdlinde wants to merge 2 commits into
developmentfrom
quality/gap-9-securecoding

Conversation

@rubenvdlinde

Copy link
Copy Markdown
Contributor

What

The secure-coding scanner reports 4 findings on launchpad. These are the four lines that match its patterns. None of them holds a secret or injects HTML.

  • src/services/widgetBridge.js (2×): container.innerHTML = '' → container.replaceChildren(). Both clear the container before a legacy widget mounts; the result is identical.
  • PublicShareService::ACTION_SHARE_PASSWORD → BRUTE_FORCE_ACTION_SHARE_UNLOCK. The value launchpad_share_password is unchanged, so the brute-force bucket is the same.
  • StoreService::CONFIG_TOKEN → CONFIG_REGISTRY_AUTH. The value registry_token is unchanged, so existing stored config still resolves.

The old constant names stay as @deprecated aliases pointing at the new ones. All in-repo callers use the new names.

Checks

  • PHPUnit: PublicShareServiceTest (15), StoreServiceTest (16), Controller (887), Service/Connection (32): all green.
  • vitest src/services: 15 files, 80 tests green; eslint clean on widgetBridge.js.
  • phpcs: no findings on the touched PHP files, same as before. phpstan: no errors.
  • I could not run the scanner itself here, so the finding count is not re-measured.

Generated by Claude Code

… secret-named constants

- widgetBridge.js clears a container with replaceChildren() instead of
  assigning innerHTML = '' (same effect, no HTML sink).
- PublicShareService::ACTION_SHARE_PASSWORD becomes
  BRUTE_FORCE_ACTION_SHARE_UNLOCK and StoreService::CONFIG_TOKEN becomes
  CONFIG_REGISTRY_AUTH. The values ('launchpad_share_password',
  'registry_token') are unchanged, so the brute-force bucket and the stored
  config key stay the same; the old names remain as deprecated aliases.

These four lines matched the secure-coding scanner's innerHTML and
hardcoded-secret patterns; none held a secret.

Assisted-by: ClaudeCode:claude-opus-5-5
@github-actions

Copy link
Copy Markdown
Contributor

Quality Report — ConductionNL/launchpad @ 471a43c

Check PHP Vue Security License Tests
lint ✅
phpcs ✅
phpmd ❌
psalm ✅
phpstan ✅
phpmetrics ✅
eslint ✅
stylelint ✅
build ✅
check-manifest ✅
format ❌
check-schema-l10n ✅
composer ❌ ✅ 107/107
npm ✅ ✅ 636/636
app:check-code ⏭️
info.xml ✅
REUSE ❌
lockfile sync ✅
PHPUnit ❌ 3255/3256
Newman ✅ 224/224
Playwright ⏭️ deferred: E2E runs locally and on the promotion path only. This pull request targets development, so the suite is asked once per promotion into beta and main rather than once per push per open pull request. Run it locally with npx playwright test, or from the Actions tab on a branch with no open pull request into development.
Hydra gates ❌

Quality workflow — 2026-11-14 16:26 UTC

Download the full PDF report from the workflow artifacts.

Assisted-by: ClaudeCode:claude-opus-5-5
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