Add runtime guards and tools check#19
Open
ndivho-makhuvha wants to merge 1 commit into
Open
Conversation
ndivho-makhuvha
marked this pull request as ready for review
July 23, 2026 14:53
ndivho-makhuvha
requested review from
miroslavpojer and
oto-macenauer-absa
as code owners
July 23, 2026 14:53
There was a problem hiding this comment.
Pull request overview
Hardens the action’s runtime bash script by adding defensive checks (tool availability, stricter warning_days validation, and safe operation when GITHUB_STEP_SUMMARY is unset), and documents the new behavior in the README.
Changes:
- Fail fast if required tools (
openssl,jq) are missing on the runner. - Enforce
warning_daysas a positive integer (reject0and non-numeric values). - Skip GitHub Step Summary writes when
GITHUB_STEP_SUMMARYis unset (local/actsafe).
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| validate.sh | Adds startup tool checks, strengthens warning_days validation, and guards Step Summary writes behind a GITHUB_STEP_SUMMARY presence check. |
| README.md | Documents the tool check and the behavior when running outside GitHub Actions without GITHUB_STEP_SUMMARY. |
Comment on lines
+41
to
43
| if ! [[ "$INPUT_WARNING_DAYS" =~ ^[0-9]+$ ]] || [[ "$((10#$INPUT_WARNING_DAYS))" -eq 0 ]]; then | ||
| echo "::error::warning_days must be a positive integer, got: '$INPUT_WARNING_DAYS'" | ||
| exit 1 |
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.
Overview
Adds a tool installed validation before action is run, also adds warning days guards, warning days should be a positive integer.
Release Notes
Related
Closes #5