#061Technical3 min

Secure AI-automated workflows

Review automation files, secret access and third-party actions before they run.

Hackaiz team · updated 21/11/2026

Illustration: a founder builds an AI app.
Illustration: a founder builds an AI app. Illustrative photo, not a screenshot.

01Review what automation can actually change

An AI-written workflow can be valid automation and still have unsafe permissions. Consider a GitHub job that builds a change proposed by an outside contributor: if that job also receives repository secrets or broad write access, the trust boundary is very different from a read-only build. Start by listing the event that launches the job, the code it fetches and the credentials each step can reach.

Hackaiz can inspect workflow files through “Check before installing”. This is static inspection: it reads the supplied definitions rather than running your automation. Use it before enabling an unfamiliar workflow or after an assistant changes a sensitive step. It does not replace the execution logs and permission settings you must review in GitHub.

02Submit the actual workflow definition

Go to /check, give the component a name that identifies the automation, then use “Or choose files” to provide its workflow file. Include local scripts the workflow calls when they are part of your review. A YAML file that invokes another script does not reveal everything that script does. Avoid sending environment files or private keys; the chooser excludes secret files and reports exclusions.

Click “Check” after reviewing the selected material. Every fresh verification uses credits, including another check of unchanged content. If files were excluded or the result is incomplete, keep that limitation with your decision. A clean result for a small fragment cannot stand in for an assessment of the entire deployment process.

03Look closely at untrusted event data

The workflow rules include unsafe use of event expressions in commands and the risks around pull_request_target. That event deserves particular care when a workflow checks out code controlled by an outside contributor. The issue is not the name of the event by itself: it is the combination of untrusted content, executable commands and access to privileged resources.

A concrete review question is whether text from an issue or pull request is placed directly into a shell command. The checker recommends passing event data through environment variables rather than inserting it as executable command text. Have a maintainer review the exact step and its inputs. Do not validate a dangerous example by running an outsider's code with production credentials.

04Reduce permissions and fix action versions

Hackaiz has rules for workflows with full write rights and third-party actions that are not pinned to a complete commit identifier, also called a SHA. Broad permissions increase what a compromised step could alter. A movable action reference can change the code your workflow runs without a corresponding change to your own repository. These are separate issues and may require separate edits.

Grant only the permissions each job needs, and review the source associated with the exact action revision you intend to use. Also inspect installation scripts, outbound transfers and secret access reported by the component checker. Necessary access should have a clear business reason; a deployment step and a documentation preview do not normally need identical authority.

05Keep a human approval point

Read findings under Danger, To fix and To watch, including the consequence and suggested alternative where present. Save a report with “Download the report” and retain the workflow revision in your own repository. The component history stores summaries, not the original file contents, so it should not be your only record of which automation was approved.

Review edits in a branch and test them with restricted credentials before restoring deployment privileges. Where Hackaiz proposes a GitHub correction, it is a draft pull request for human review and approval, never an automatically merged change. Checking automation is not permission to execute it; keep the approval decision separate from the inspection result.

Frequently asked questions

Was this article helpful?

Related articles