* fix: remove literal ${{ runner.temp }} from action.yaml
GitHub evaluates all ${{ }} expressions in action.yaml, including inside
input descriptions where the `runner` context is unavailable. The literal
${{ runner.temp }} in the `path` description made the action fail to load
with "Unrecognized named-value: 'runner'", breaking every consumer of
v0.3.0 regardless of whether `path` was set.
Fixes#37
* test: add CI workflow exercising the action
Run the action on ubuntu/windows/macos (defaults, cache, custom path) and
assert that an invalid `path` is rejected. Actually using the action via
`uses: ./` catches load-time errors like #37 that static linters miss.
* test: use Trivy v0.71.0 in CI workflow
v0.68.2 has no release assets, so the install step 404s. v0.71.0 (the version
from #37) downloads correctly.
* test: add positive control to reject-invalid-path job
The job asserted only that the install step failed, so it stayed green even
when the action failed to load entirely (the #37 regression). Add a control
step that installs with a valid path and must succeed, so the job can only
pass when the action loads and then rejects the invalid paths.
* fix: prevent script injection in run blocks
Use env variables instead of direct ${{ }} interpolation in shell
commands to prevent script injection vulnerabilities.
* fix: quote $GITHUB_OUTPUT and $GITHUB_PATH to prevent word splitting
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
* fix: use shell fallback for default path to ensure $HOME expansion
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
* fix: validate path input to fail early on unexpanded shell variables
Since `path` is passed via env to prevent script injection, shell
variables and `~` inside it are not expanded. Reject such inputs with a
clear error instead of silently creating a directory literally named
`$HOME`.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
* fix: reject newlines in path input and document literal-path requirement
- switch `path` validation to a `case` block and reject newline/CR to
prevent injecting extra lines into $GITHUB_OUTPUT (output poisoning)
- reject `~` anywhere, not only as a prefix, for consistency
- document the literal-path requirement in the `path` input description
and README (use ${{ runner.temp }}, not $RUNNER_TEMP)
---------
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-authored-by: DmitriyLewen <dmitriy.lewen@smartforce.io>
* feat: add `token` input and pin `github-server-url`
* fix: use `${{ github.token }}` as default value for token
* docs: add info about token in README.md
* docs: bump Trivy version
As Trivy checks out its installation script into the same directory as
the workflow users own code is typically checked out into this can cause
other linters/checks that a workflow is using to fail due to the
unexpected install script being present. This commit modifies the
action to ensure that the installation script is removed after the
action has installed trivy.