Skip to content

[2014] Add an on and off switch from a GitHub or GitLab variable - #3

Merged
ivangrynenko merged 1 commit into
mainfrom
feature/2014-scan-switch
Nov 8, 2026
Merged

ivangrynenko merged 1 commit into
mainfrom
feature/2014-scan-switch

Conversation

@ivangrynenko

Copy link
Copy Markdown
Contributor

The scan can now be turned on and off from a CI variable, without editing the workflow (truecms/sentinel#2014).

What changed

  • New action input enabled. The example passes ${{ vars.SENTINEL_UPGRADE_SCAN }}, so a repository, organisation or environment variable turns the scan on (true) or off (false). Left out, the action reads the job's SENTINEL_UPGRADE_SCAN as before.
  • The script accepts true, 1, yes, on and false, 0, no, off in any case. Empty or off passes the job without doing anything; any other value fails it.
  • GitHub and GitLab examples no longer hard-code the switch; the README and the AI prompt say to set it as a variable.
  • A CI job runs the action itself: off through the input, empty input, and the job variable fallback.

Access and exposure

Question Answer
Who may reach it? Unchanged. Only people who can edit the customer's CI variables can turn the scan on or off.
What stops everyone else? GitHub and GitLab variable permissions. Sentinel still checks the scan key.
Is it released? Sentinel's own route switch and rollout are unchanged.
What does it reveal? The switch value only. The key and UUID are not read while the switch is off.
How is it tested? Bats tests for each switch value, and the new action-switch CI job.

Checks run

  • bats tests/upgrade-scan/scan.bats: 56 passed.
  • shellcheck: clean. YAML parsed.
  • Codex review (GPT-6.1 Terra, xhigh): see below.

@ivangrynenko
ivangrynenko merged commit e79f53b into main Nov 8, 2026
2 checks passed
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