October DealsAmazon USOctober deal check: compare before you payAmazon US: current deals, useful picks and tech finds.Check DealsWindows FixRecommendedWindows errors stealing your time? Find the fix fastScan stability, cleanup and performance issues.Fix NowOctober DealsAmazon USDeal season is back - check today's better picksAmazon US: current deals, useful picks and tech finds.See Picks×
Skip to content
World desk5 min

How to Add Security Checks to a GitHub Actions CI Pipeline

A practical sequence for securing GitHub Actions: restrict token permissions and secrets, pin actions, scan workflow and dependency changes, and isolate untrusted pull requests.
Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Start by limiting what each workflow can access: set minimal GITHUB_TOKEN permissions, expose secrets only to jobs that need them, and pin third-party actions to full commit SHAs. Then add pull-request checks for workflow risks and dependency changes, keep untrusted contributions away from privileged jobs, and use short-lived cloud credentials and artifact attestations where they fit.

1. Reduce token permissions and secret exposure

A GitHub Actions workflow is executable code, and every action in a job should be treated as part of that job’s trusted computing base. A compromised or unsafe action may be able to use the credentials and repository permissions available to the job. Begin by declaring permissions explicitly and granting only what the workflow needs.

As an Amazon Associate I earn from qualifying purchases.

GitHub describes read access to repository contents as a good default for GITHUB_TOKEN. Increase permissions only for the specific job that needs them; avoid granting write access at workflow level when only a release or deployment job requires it. See GitHub’s secure use reference for permission and action-hardening guidance.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Store sensitive values as GitHub secrets rather than plaintext in workflow files. Pass a secret only to the action or job that requires it, and inspect logs for accidental disclosure. For higher-risk deployment secrets, use environment protection rules so a reviewer can approve access before the job runs; consult GitHub’s secrets documentation for current behavior and configuration.

#1 Best Overall
Yubico - Security Key C NFC - Basic Compatibility - Multi-Factor authentication (MFA) Security Key and passkey, Connect via USB-C or NFC, FIDO Certified
  • POWERFUL SECURITY KEY: The Security Key C NFC is the essential physical passkey for protecting your digital life from phishing attacks. It ensures only you can access your accounts.
  • WORKS WITH 1000+ ACCOUNTS: Compatible with Google, Microsoft, and Apple. A single Security Key C NFC secures 100 of your favorite accounts, including email, password managers, and more.
  • FAST & CONVENIENT LOGIN: Plug in your Security Key C NFC via USB-C and tap it, or tap it against your phone (NFC) to authenticate. No batteries, no internet connection, and no extra fees required.
  • TRUSTED PASSKEY TECHNOLOGY: Uses the latest passkey standards (FIDO2/WebAuthn & FIDO U2F) but does not support One-Time Passwords. For complex needs, check out the YubiKey 5 Series.
  • BUILT TO LAST: Made from tough, waterproof, and crush-resistant materials. Manufactured in Sweden and programmed in the USA with the highest security standards.

2. Secure third-party actions and workflow changes

Pin third-party actions to full-length commit SHAs. GitHub states that this is currently the only way to use an action as an immutable release; tags are easier to read but can be moved or deleted. Before pinning, verify that the SHA belongs to the intended action repository. Review action source and how it handles repository content, environment variables, and secrets. For the rationale and update practices, see GitHub’s secure use reference.

Make changes to CI security controls visible to reviewers. A CODEOWNERS rule for .github/workflows can require the appropriate maintainers to review workflow edits. Track action updates and advisories, and use Dependency Review when pull requests change dependencies.

Rank #2
Yubico - YubiKey 5C NFC - Multi-Factor authentication (MFA) Security Key and passkey, Connect via USB-C or NFC, FIDO Certified - Protect Your Online Accounts
  • POWERFUL SECURITY KEY: The YubiKey 5C NFC is the most versatile physical passkey, protecting your digital life from phishing attacks. It ensures only you can access your accounts
  • WORKS WITH 1000+ ACCOUNTS: Compatible with popular accounts like Google, Microsoft, and Apple. A single YubiKey 5C NFC secures 100+ of your favorite accounts, including email, password managers, and more
  • FAST & CONVENIENT LOGIN: Plug in your YubiKey 5C NFC via USB and tap it, or tap it against your phone (NFC), to authenticate. No batteries, no internet connection, and no extra fees required
  • MOST SECURE PASSKEY: Supports FIDO2/WebAuthn, FIDO U2F, Yubico OTP, OATH-TOTP/HOTP, Smart card (PIV), and OpenPGP. That means it’s versatile, working almost anywhere you need it
  • PRIMARY & SPARE KEYS: Just like having a spare house key, we recommend buying two YubiKeys - one for daily use and one as a spare. That way you’ll never get locked out of your accounts

3. Add pull-request checks that match the risks

Different checks inspect different things; no single scanner establishes that a pipeline is safe. Use workflow-focused analysis for configuration and script risks, and dependency review for newly introduced packages.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Check What it examines When and how to use it
GitHub code scanning Common vulnerable patterns, including workflow-related issues Run against repository code and workflow files; review findings and remediate applicable issues. Eligibility and configuration depend on repository settings and plan.
OpenSSF Scorecards Practices such as script-injection risks, token permissions, and action pinning Use findings to identify areas for review and improvement; a passing result is not proof of security.
Dependency Review Dependency changes introduced by a pull request, including known vulnerable packages Add it as a pull-request check. If configured as a required status check, it can block merges that introduce known vulnerable packages.

GitHub recommends code scanning and Scorecards for workflow risks, and documents Dependency Review as a way to inspect dependency changes. Read the workflow security guidance and Dependency Review documentation. Confirm feature eligibility and repository settings before making a check a merge gate. Treat scanner results as signals to investigate and fix, not as evidence that no vulnerabilities remain.

Rank #3
Yubico - YubiKey 5 NFC - Multi-Factor authentication (MFA) Security Key and passkey, Connect via USB-A or NFC, FIDO Certified - Protect Your Online Accounts
  • POWERFUL SECURITY KEY: The YubiKey 5 NFC is the most versatile physical passkey, protecting your digital life from phishing attacks. It ensures only you can access your accounts
  • WORKS WITH 1000+ ACCOUNTS: Compatible with popular accounts like Google, Microsoft, and Apple. A single YubiKey 5 NFC secures 100+ of your favorite accounts, including email, password managers, and more
  • FAST & CONVENIENT LOGIN: Plug in your YubiKey 5 NFC via USB and tap it, or tap it against your phone (NFC), to authenticate. No batteries, no internet connection, and no extra fees required
  • MOST SECURE PASSKEY: Supports FIDO2/WebAuthn, FIDO U2F, Yubico OTP, OATH-TOTP/HOTP, Smart card (PIV), and OpenPGP. That means it’s versatile, working almost anywhere you need it
  • PRIMARY & SPARE KEYS: Just like having a spare house key, we recommend buying two YubiKeys - one for daily use and one as a spare. That way you’ll never get locked out of your accounts

4. Keep untrusted pull requests out of privileged workflows

The key question is whether code supplied by a contributor can run while a workflow has secrets or a privileged token. Avoid pull_request_target unless its privileged context is genuinely needed. In particular, do not check out, build, or run untrusted pull-request code in a pull_request_target workflow when secrets or a privileged GITHUB_TOKEN are available. GitHub explains this risk in its pull_request_target event guidance.

Apply the same trust-boundary thinking to other privileged triggers and to artifacts created by workflows that processed untrusted contributions. Keep release and deployment steps separate from untrusted build steps, and require explicit review or other appropriate controls before those privileged steps run.

Rank #4
Yubico - Security Key NFC - Basic Compatibility - Multi-Factor Authentication (MFA) Key, Connect via USB-A or NFC, FIDO Certified
  • POWERFUL SECURITY KEY: The Security Key NFC is the essential physical passkey for protecting your digital life from phishing attacks. It ensures only you can access your accounts.
  • WORKS WITH 1000+ ACCOUNTS: Compatible with Google, Microsoft, and Apple. A single Security Key NFC secures 100 of your favorite accounts, including email, password managers, and more.
  • FAST & CONVENIENT LOGIN: Plug in your Security Key NFC via USB-A and tap it, or tap it against your phone (NFC) to authenticate. No batteries, no internet connection, and no extra fees required.
  • TRUSTED PASSKEY TECHNOLOGY: Uses the latest passkey standards (FIDO2/WebAuthn & FIDO U2F) but does not support One-Time Passwords. For complex needs, check out the YubiKey 5 Series.
  • BUILT TO LAST: Made from tough, waterproof, and crush-resistant materials. Manufactured in Sweden and programmed in the USA with the highest security standards.
Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

5. Prefer short-lived cloud credentials for deployment

When a cloud provider supports it, configure OpenID Connect (OIDC) so a workflow can exchange an identity token with the provider instead of storing long-lived cloud credentials as repository secrets. The provider’s trust policy should restrict which repository, workflow, branch, environment, or other supported identity can assume the role.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Exact identity claims and provider support vary and can change. Set the trust policy using current guidance for both GitHub and the provider rather than copying a broad example. GitHub’s OIDC deployment-hardening documentation covers the GitHub side.

Best Value
Yubico - Security Key C NFC - Basic Compatibility - Multi-Factor authentication (MFA) Security Key and passkey, Connect via USB-C or NFC, FIDO Certified (Pack of 2)
  • The information below is per-pack only
  • POWERFUL SECURITY KEY: The Security Key C NFC is the essential physical passkey for protecting your digital life from phishing attacks. It ensures only you can access your accounts.
  • WORKS WITH 1000+ ACCOUNTS: Compatible with Google, Microsoft, and Apple. A single Security Key C NFC secures 100 of your favorite accounts, including email, password managers, and more.
  • FAST & CONVENIENT LOGIN: Plug in your Security Key C NFC via USB-C and tap it, or tap it against your phone (NFC) to authenticate. No batteries, no internet connection, and no extra fees required.
  • TRUSTED PASSKEY TECHNOLOGY: Uses the latest passkey standards (FIDO2/WebAuthn & FIDO U2F) but does not support One-Time Passwords. For complex needs, check out the YubiKey 5 Series.

6. Add artifact provenance when consumers can use it

For binaries or packages that consumers need to verify, GitHub artifact attestations can associate a released artifact with its repository, workflow, commit, triggering event, and related build context. This provides provenance information; it does not guarantee the artifact itself is secure. Consumers still need to assess the source and decide what provenance evidence their acceptance policy requires. See GitHub’s artifact attestations documentation.

Put the checks in place in a useful order

  1. Set the permission baseline: declare workflow or job permissions, start from read-only repository contents where practical, and add only the access each job needs.
  2. Limit credential exposure: move sensitive values to GitHub secrets, pass them only to the jobs that need them, and add environment approval for sensitive deployment credentials where appropriate.
  3. Harden action references: verify third-party action repositories and pin references to full commit SHAs. Assign review ownership for .github/workflows.
  4. Configure pull-request checks: add workflow-oriented code scanning or Scorecards, and Dependency Review for dependency changes. Decide which checks should be required after confirming repository eligibility and settings.
  5. Review trigger and execution boundaries: ensure untrusted pull-request code cannot execute in privileged workflows with access to secrets or a powerful token.
  6. Harden deployment and release paths: use OIDC with a narrowly scoped provider trust policy where supported, and publish attestations for artifacts consumers are expected to verify.

Choose checks by what they protect

Before making a check mandatory, be clear about the risk it addresses and who owns its findings. Compare checks by what they inspect (workflow configuration, source, dependency changes, credentials, action references, or release artifacts), when they run (pull request, schedule, release, or consumption), and whether they report advice or enforce a required status. Also account for credential exposure, repository and language support, plan eligibility, provider support, update cadence, false positives, and who approves exceptions.

A check can reduce a specific risk only within its coverage and configuration. Required status checks help enforce merge policy, but they do not make privileged workflow design safe by themselves; likewise, provenance identifies build context but is not a security verdict on the artifact.

Free tools Windows power users keep installed

One-click scans. No signup required.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.

Leave a Reply

Your email address will not be published. Required fields are marked *

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

More from the Wire

  1. World desk4 min
    How to Spot an AI Voice Scam Before Sending MoneyDon’t rely on how a caller sounds. Pause, call back through a known number, and verify the emergency with another trusted person before sending money.
  2. Mountain View desk4 min
    Google’s SynthID Detector: How to Check AI-Generated Images, Video and AudioGoogle’s SynthID Detector looks for an embedded watermark in supported images, video and audio. Here is what its results do—and do not—show.
  3. Redmond desk20 min
    How to create a link to File or Folder in Windows 11Windows 11 gives you several ways to point to a file or folder without moving or duplicating it. You can create a desktop shortcut,…
Recommended PC Tool
Recommended PC Tool
Crashes, No Sound, or Screen Glitches?Free driver scan
PC Slower Than It Used to Be?Free scan - under a minute

Two free Windows tools

One Free Minute Could Fix That PC

Before you go - each of these free tools takes about a minute and tackles what quietly slows a Windows PC down.

Special offer. View Outbyte info, uninstall instructions, EULA, and Privacy Policy.