Repository navigation
feat(wiz-sensor): add composite action to start the Wiz runner sensor - #140
Open
javiergarciavera wants to merge 1 commit into
Open
javiergarciavera wants to merge 1 commit into
javiergarciavera wants to merge 1 commit into
Conversation
Starts the Wiz runner sensor as the first step of a job, gated on the org variable WIZ_SENSOR_ENABLED and the org secret WIZ_SENSOR_TOKEN. Linux GitHub-hosted runners only, never on pull_request_target, and a sensor failure never fails the job. Parsed token fields are masked before the pinned Wiz action runs. Refs INFRA-4214
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes using default effort and found 1 potential issue.
Reviewed by Cursor Bugbot for commit 5dbb215. Configure here.
| echo "::notice title=Wiz sensor::Skipped because WIZ_SENSOR_ENABLED is not true." | ||
| else | ||
| echo "::notice title=Wiz sensor::Skipped because WIZ_SENSOR_TOKEN is not set." | ||
| fi |
There was a problem hiding this comment.
Skip path can fail jobs
Low Severity
The skip step is the no-op path for Windows, macOS, and self-hosted runners, and it invokes bash without fail-open handling. On a Windows self-hosted runner where Git Bash is not on PATH, the runner cannot start that step and fails the calling job.
Reviewed by Cursor Bugbot for commit 5dbb215. Configure here.
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.


Summary
Adds a
wiz-sensorcomposite action that starts the Wiz runner sensor as the first step of a job. It is the single shared step that all Consensys repos will reference by commit SHA (INFRA-4214, epic INFRA-4005 / SOCIR-12061). Same approach as INFRA-4094 inconsensys-vertical-apps.The action does nothing until the org variable
WIZ_SENSOR_ENABLEDis the stringtrueand the org secretWIZ_SENSOR_TOKENis set. Both will be created by TechOps. Merging this PR changes no behaviour on its own, because nothing calls the action yet.Behaviour
pull_request_target.Skipped because WIZ_SENSOR_ENABLED is not true) when the variable is nottrueor the token is empty.continue-on-error).WIZ_SENSOR_ENABLEDtofalseat org level, no workflow change needed.wiz-sec-public/wiz-sensor-github-action@2f72488477988739561233bbc10ceff0c53273fd(current default branch head, 2026-09-30, verified).registry-username,registry-password,wiz-api-client-id,wiz-api-client-secret) are masked with::add-mask::before the Wiz action runs, because GitHub masks the whole JSON secret but not the fields parsed from it, and the Wiz action puts them on adocker runcommand line. The sensor does not start if masking fails.Review notes
{and}and silently drops job outputs containing them. Documented inwiz-sensor/README.md.runner.environment), skipspull_request_target, and fails closed when the token is not a JSON object.Test plan
WIZ_SENSOR_ENABLEDunset orfalse, a job using the action logs the skip line and passes.pull_request_targetrun, the action logs the skip line and passes.WIZ_SENSOR_ENABLED=trueon one private repo shows image pulled, signature verified,Wiz Sensor started successfully!, token masked, no registry password or client secret in logs, job passes.Refs INFRA-4214
Note
Medium Risk
Introduces handling of org-level Wiz credentials and pre-masking of parsed secret fields; safeguards (gating, no pull_request_target, fail-open) limit blast radius but token misuse in workflows would still be sensitive.
Overview
Adds a new
wiz-sensorcomposite action (plus README) so workflows can start the Wiz GitHub runner sensor as the first job step, gated by org variableWIZ_SENSOR_ENABLEDand secretWIZ_SENSOR_TOKEN. Nothing in this repo calls it yet, so merge alone does not change CI behavior.The action no-ops with a notice when the runner is not Linux/GitHub-hosted, the event is
pull_request_target,enabledis not the stringtrue, or the token is empty. When it runs, a Node step parses the single-line JSON token and registers registry/API credential fields with::add-mask::before invoking the pinnedwiz-sec-public/wiz-sensor-github-action; the sensor step is skipped if masking fails. Both masking and the Wiz step usecontinue-on-error, so sensor problems never fail the job.Reviewed by Cursor Bugbot for commit 5dbb215. Bugbot is set up for automated code reviews on this repo. Configure here.