Skip to content

Fix boolean inputs, duplicate --debug and credential leakage - #31

Open
jochen-testingbot wants to merge 1 commit into
masterfrom
fix/input-handling
Open

jochen-testingbot wants to merge 1 commit into
masterfrom
fix/input-handling

Conversation

@jochen-testingbot

Copy link
Copy Markdown
Contributor

First PR in a series. Merge in order: each one is based on the previous branch, so later PRs show only their own changes once this one is merged.

Bugs fixed

  • Boolean inputs couldn't be turned off. Any non-empty value added the flag, so shared: false still passed --shared (same for noBump, noCache, noProxy, debug and doctor). Flags are now parsed like core.getBooleanInput: true/false (any case), empty means off. Anything else fails with a clear error instead of silently turning the option on.
  • --debug could be passed twice, once from the debug input and once from runner debug mode.
  • auth and proxyCredentials leaked. They were passed as CLI args, so they showed up in docker inspect and ps and were never masked in the workflow log. They're now registered with setSecret and forwarded with -e TESTINGBOT_AUTH / -e TESTINGBOT_PROXY_USERPWD (value taken from docker's own environment, not the command line).

Compatibility

The TESTINGBOT_AUTH / TESTINGBOT_PROXY_USERPWD env vars need tunnel 4.8 or newer. The default tbVersion: latest is fine; anyone pinning tbVersion below 4.8 who uses these two inputs would lose them. The README notes this.

Tests

New unit tests cover flags set to false, invalid boolean values, the --debug dedupe, buildSecretEnv, and the env forwarding in startTunnel. npm test: 29 passing. dist/ is rebuilt.

- Flag inputs (shared, noBump, noCache, noProxy, debug, doctor) set to
  'false' no longer enable the flag; invalid values fail with a clear error
- --debug is only passed once when both the debug input and runner debug
  mode are enabled
- auth and proxyCredentials are masked and forwarded via TESTINGBOT_AUTH /
  TESTINGBOT_PROXY_USERPWD env vars instead of CLI args, so they no longer
  show up in docker inspect / ps
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