Skip to content

Prevent running authorized actions in empty environment#1556

Merged
brianmcgillion merged 1 commit intomainfrom
prevent-running-authorized-actions-in-empty-environment
Nov 11, 2025
Merged

Prevent running authorized actions in empty environment#1556
brianmcgillion merged 1 commit intomainfrom
prevent-running-authorized-actions-in-empty-environment

Conversation

@henrirosten
Copy link
Copy Markdown
Collaborator

@henrirosten henrirosten commented Nov 11, 2025

Description of Changes

Fail the github action authorization step if the 'ENV_DEFINED' variable is not set in the environment the github action workflow is running.

This change prevents running authorized actions in an empty environment, which could happen due to misconfiguration such as; a typo in an environment name or accidental removal of the internal or external github environments. This additional check is needed because github actions do not fail if one attempts to run an action in non-existent environment. Instead, in such a case github action would create an empty environment and continue the execution.

This is defense-in-depth, trying to make the current github action configuration less prone to potentially fatal misconfigurations in the future.

warn-on-workflow-changes failure is expected since this PR modifies the file .github/workflows/authorize.yml‎ and it will pass again as soon as this PR is merged.

Type of Change

  • New Feature
  • Bug Fix
  • Improvement / Refactor

Related Issues / Tickets

Checklist

  • Clear summary in PR description
  • Detailed and meaningful commit message(s)
  • Commits are logically organized and squashed if appropriate
  • Contribution guidelines followed
  • Ghaf documentation updated with the commit - https://tiiuae.github.io/ghaf/
  • Author has run make-checks and it passes
  • All automatic GitHub Action checks pass - see actions
  • Author has added reviewers and removed PR draft status

Testing Instructions

Applicable Targets

  • Orin AGX aarch64
  • Orin NX aarch64
  • Lenovo X1 x86_64
  • Dell Latitude x86_64
  • System 76 x86_64

Installation Method

  • Requires full re-installation
  • Can be updated with nixos-rebuild ... switch
  • Other:

Test Steps To Verify:

  1. ...

Signed-off-by: Henri Rosten <henri.rosten@unikie.com>
@brianmcgillion brianmcgillion merged commit 196413b into main Nov 11, 2025
26 of 27 checks passed
@brianmcgillion brianmcgillion deleted the prevent-running-authorized-actions-in-empty-environment branch November 11, 2025 08:24
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.

2 participants