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

iTechGuides is reader-supported. When you buy through links on our site, we may earn an affiliate commission. As an Amazon Associate I earn from qualifying purchases. Learn more

Secure GitHub Actions secrets by treating workflow code, actions, tokens, and repository access as part of the credential boundary. Give each job only the permissions it needs, place each secret in the narrowest useful scope, keep privileged jobs away from untrusted pull-request code, pin third-party actions, and use OpenID Connect (OIDC) instead of long-lived cloud keys when your provider supports it. GitHub’s masking helps, but it cannot guarantee that every form of a secret will stay hidden.

Start with the threat model: a secret is usable by code

A value stored in GitHub’s secret store is not automatically safe. Any workflow step or action that can read a secret can potentially send it to a log, an external service, an artifact, a build output, or an attacker-controlled endpoint. A malicious change to workflow code, a compromised action, or an over-privileged contributor can therefore turn a correctly stored secret into an exposed credential.

Repository access is part of the same threat model. Anyone with write access to a repository can read its configured secrets through a workflow they are allowed to modify. Protecting secrets consequently requires both GitHub settings and ordinary repository controls: review who can push workflow changes, require pull-request review for workflow files, and monitor changes under .github/workflows/.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
  • Use a separate credential for each system, repository, environment, and purpose where practical.
  • Grant the smallest possible token and cloud permissions.
  • Make production credentials available only to a deployment job that needs them.
  • Assume every third-party action in a privileged job is executable code inside that job’s trust boundary.
  • Design pull-request workflows so untrusted source cannot reach deployment credentials or write-capable tokens.

Set restrictive workflow and job permissions

The GITHUB_TOKEN is created for each run. Its authority is controlled by the workflow or job-level permissions key. GitHub recommends a read-only default for repository contents, with individual jobs elevated only when a documented operation requires it. There is no universally correct permissions block: the required scopes depend on what each job actually does.

#1 Best Overall
Sale
Compressed Air Duster,130000RPM Super Power Cordless Air Duster,Rechargeable Brushless Blower,3 Gear Adjustable Blower with LED Light,Dust Remover for Computer/House/Outdoor/Car
  • Powerful Turbo Fan:CAGIWIRU Electric Air Duster have reached speed up to 130000RPM,Can efficient remove dust and debris.With LED light and Three Adjustable Speed to meet with different cleaning tasks.
  • With Attached USB C Fasting Charging cable.Charing 3 hours,Enjoy up to 240 minutes of use on the lowest setting, For third speed can use for 25mins.with four charging options to meet with your needs.
  • Wide Application:Upgraded attached 5 different nozzles,making it suitable for a variety of scenes, such as car,pet, pc, keyboards, and other electronic devices. It also serves for office and home clean duster.
  • Handy Design & Portable:Cordless air duster electric nozzle is Light weight and small size, design and comfortable to hold and space saving, convenient to carry around. You can put it in your room or inside the car without taking up space.
  • Warranty & Support: Our Electric air duster comes with 5 years warranty and 24/7 customer service. During this period, if you have any questions,pls kindly feel free to contact us.

Use a deny-by-default starting point

name: CI

on:
  push:
  pull_request:

permissions:
  contents: read

jobs:
  test:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@<verified-full-commit-sha>
      - run: ./ci/test.sh

This permits checkout and other operations that only need repository contents. It does not grant broad write access to issues, pull requests, packages, releases, or deployments. If a job needs a different scope, declare it on that job rather than widening every job.

Elevate only the job that needs it

jobs:
  publish:
    runs-on: ubuntu-latest
    permissions:
      contents: read
      packages: write
    steps:
      - uses: actions/checkout@<verified-full-commit-sha>
      - name: Publish package
        run: ./ci/publish.sh

Review the action documentation and the API operation to determine the exact scope. A job that creates a release may need a release-related write permission; a job that only reads code should not inherit it. Keep deployment credentials and write-capable tokens out of test, lint, and build jobs.

Understand OIDC permission separately

For cloud federation, add id-token: write only to the job that requests an OIDC token:

What’s actually slowing this PC down?

Pick the symptom - the matching free tool is one click away.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
jobs:
  deploy:
    permissions:
      contents: read
      id-token: write
    steps:
      - uses: actions/checkout@<verified-full-commit-sha>
      - name: Deploy
        run: ./ci/deploy.sh

id-token: write allows the job to request a GitHub OIDC token. It does not itself grant permission to modify cloud resources. The cloud provider’s trust policy and the identity mapped to the token determine what the deployment can do.

Choose the narrowest secret scope

GitHub provides repository, organization, and environment secrets. Choose the smallest boundary that matches the workflow’s use. A secret should not be organization-wide merely because several repositories might eventually need it.

Rank #2
EVEO® Screen Cleaner Spray Kit (Streak-Free) TV Screen Cleaner for Smart TV, Lcd, LEd, Oled | Computer Screen Cleaner Spray and Wipe Microfiber Cloth - TV, Monitor, Laptop, iPad, Car - 6.7oz 1 Pack
  • Screen Cleaner is Your Screen’s New Bestfriend! - EVEO is proud to present a screen cleaner that’s perfectly suited for your TV. Meet your new screen cleaner, computer screen cleaner, laptop cleaner, iPad cleaner, Macbook,tv cleaner or any other electronic device. Our screen cleaner spray and wipe along with the included plush microfiber cloth, easily removes dust, fingerprints & other smudges on the screen’s surface. Clean effectively for a streak-free screen
  • Gentle on your Screens - Our screen cleaner spray and wipes is compatible to be used even for the most sensitive LCD, LED, CRT, and OLED screens in proper use. Be at ease knowing that this product is compatible with all the major brands: LG, SONY, Samsung, Sharp, iPad, iPhone, Android screens, Kindle, PC monitors - we’ve got you covered! Can be used as LCD screen cleaner, tv cleaner, smart tv screen cleaner, and more
  • Premium Super Soft Plush Microfiber Cloth - Included in this efficient screen cleaning kit. This screen cleaner spray and wipe has our signature plush microfiber cloth specially designed to comply with screens and monitors and leave them streak-free. Has been shown to effectively absorbs stubborn stains, zero streaks, and no fiber shedding. Always use this together with our screen cleaner for the best results
  • Easy-to-Use Screen Cleaner Kit + microfiber cleaning cloth - The EVEO Screen Cleaning Kit will easily be your new favorite tool when it comes to taking care of the things you love most, quick and easy solution for a streak-free screen. Simply screw on the sprayer gun on the screen cleaner bottle. Spray the cleaning liquid onto the microfiber cloth, then wipe the screen until desired cleanliness & shine is achieved.
  • Quality Screen Care Kit Worth Purchasing - Enjoy a convenient Screen Cleaner anytime, anywhere you need it. Your satisfaction is our top priority. We stand behind the quality of our products and that’s why, you shouldn’t be worrying at all. We manufacture the Best Screen Cleaner. and can be used for laptop cleaning kit, laptop screen cleaner, tv screen cleaner for smart tv. MacBook screen cleaner, monitor cleaner or screen cleaner spray for electronic devices with microfiber cleaning cloth
Scope Where it is available Useful control Availability timing
Repository Workflows in that repository Simple for a single repository; every eligible workflow in the repository may reference it Read when a run is queued
Organization Repositories permitted by the organization secret’s repository policy Central administration with an allow-list of selected repositories Read when a run is queued
Environment Jobs that reference the named environment Deployment boundary, environment protection rules, and required reviewers Read when the environment-referencing job starts

Use environment secrets for protected deployments

Put production credentials in a production environment rather than exposing them to every job. Configure required reviewers and any branch or deployment rules available in your repository settings. The deployment job must declare the environment:

jobs:
  deploy-production:
    environment: production
    runs-on: ubuntu-latest
    permissions:
      contents: read
      id-token: write
    steps:
      - uses: actions/checkout@<verified-full-commit-sha>
      - run: ./ci/deploy-production.sh

Environment secrets are read when this job starts. A required reviewer can therefore hold the job before the credentials become available, reducing the chance that an automatically triggered build uses production access.

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.

Know the current limits and naming rules

  • Each secret can be at most 48 KB.
  • An organization can have up to 1,000 organization secrets.
  • A repository can have up to 100 repository secrets.
  • An environment can have up to 100 environment secrets.
  • If an organization makes more than 100 organization secrets available to a repository, a workflow can use only the first 100 organization secrets sorted alphabetically by secret name.
  • Secret names are case-insensitive and stored in uppercase.
  • Names cannot start with a number or use the GITHUB_ prefix.

Avoid putting structured documents, multiline bundles, or large configuration blobs into a single secret when separate values or an external secret manager are possible. Structure and transformations can make reliable log redaction less predictable.

Keep untrusted pull requests away from privileged credentials

Fork pull requests

For a pull request submitted from a fork, GitHub withholds secrets other than GITHUB_TOKEN. The token supplied to that workflow is read-only. This allows ordinary tests to run without handing a contributor’s fork access to repository credentials, but it can also cause a workflow that expects a secret to fail. Handle that case explicitly instead of trying to bypass the restriction.

Dependabot pull requests

Dependabot pull requests are subject to related credential restrictions. Treat them like other untrusted changes: run validation with read-only permissions and do not assume that repository or environment secrets are available.

Rank #3
BladeHawks RGB Gaming Mouse Pad Extra Large Extended 31.5x12 Inch-Black
  • 【Large size】:Measuring 800 x 300 mm/ 31. 5×12 inches, which is wider and taller than others. Large mouse pad can perfectly fit your keyboard and mouse of any size, and there is also ample space for peripherals such as phones, tablets, etc.
  • 【LED backlight mouse pad】:Blade Hawks RGB mouse pad provides 7 static modes and 7 dynamic modes will give you the options you are looking for. Power-off memory function remembers the last lighting mode you selected. The super glow fiber Chroma will give you a colorful gaming setup that you want.
  • 【Anti-slip rubber base】:Made from Natural rubber, this gaming mousepad will firmly grip your desktop, allowing you to enjoy the ultimate precision in the games you are most passionate about. It also comes with a texture that enhances this ability even further.
  • 【Smooth and waterproof surface】: Micro-textured cloth surface, for extremely precise mouse control and a smooth movement. When liquid splashes on the gaming mouse pad, it forms water droplets and slides down. Will not delay your work or gameplay.
  • 【Plug and play】: This mouse and keyboard pad is powered by USB, plug and play, no driver required. One button control light modes. Press one time to change the lighting mode, press twice to change the brightness, press and hold about 3 seconds turn ON/OFF.

Be cautious with pull_request_target

pull_request_target runs in the context of the base repository and can access its secrets and a write-capable token according to the workflow permissions. That makes it useful for carefully designed labeling or review automation, but dangerous if it checks out or executes the pull request’s untrusted files. Never combine privileged credentials with arbitrary code from the contributor’s branch.

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

A safe pattern is to keep the privileged workflow limited to trusted, checked-in automation and send untrusted changes to a separate read-only workflow. If a privileged workflow must inspect a pull request, pass only controlled metadata to a fixed action or script; do not execute the pull request’s scripts, build hooks, or generated commands.

Prevent shell and expression injection

Event fields such as issue titles, branch names, commit messages, and pull-request text are attacker-controlled. Interpolating them directly into a shell program lets an attacker alter the command that runs.

Unsafe interpolation

- name: Comment on issue
  run: echo "${{ github.event.issue.title }}"

The expression is substituted before the shell receives the script. Quotes, command substitutions, newlines, or other shell syntax in the title can change its behavior.

Pass data as data

Prefer a maintained action’s input interface, with the event value supplied as an argument:

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Rank #4
Sale
Vaydeer Wrist Rest for Keyboard and Mouse, Computer Ergonomic Wrist Support Pad, Soft Memory Foam Arm Cushion for Desk, Palm Hand Office Laptop Typing
  • 【Softer and More Comfortable】Vaydeer wrist rest has unique diamond pattern, which is the combination of softness and aesthetics. The materials of wrist rest are improved into higher quality memory foam and covered with silky smooth lycra. The computer wrist rest makes you as comfortable and cushiony as like rest your wrists on clouds.
  • 【Ergonomic Wrist Saver】The wrist rests for keyboard and mouse comes with a 17.32×3.15×0.83 inch keyboard wrist pad and a 5.94×3.15×0.83 inch mouse wrist support. Based on ergonomic design, the unique concave shape is the perfect fit for your wrist joints. The wrist rest pad fits most computer keyboards and laptops, improve hand and wrist posture, release your wrist and arm stress.
  • 【Non-Slip Rubber Bottom】Featuring an anti-skid silicone base on the bottom, this wrist keyboard support stays firmly in place on your desk, preventing the padding from sliding around, ensuring stable and consistent wrist support during extended computer sessions.
  • 【Better Experience & Pain Relief】Our keyboard arm rest is beneficial to alleviate the soreness caused by direct contact and friction between your arm and a hard desk surface, reducing the risk of wrist fatigue or carpal tunnel. The soft texture of memory foam can evenly distribute the pressure around your wrists and provide good support with just enough give.
  • 【Helpful in Multiple Scenarios】Whether you're working, studying, writing, typing, gaming, this keyboard and mouse rest combo is an essential accessory to add comfort and support to your hands and wrists. It’s also a great gift for men, women, family, friend, coworker, gamer, teacher, etc.
- name: Process issue title
  uses: example/issue-tool@<verified-full-commit-sha>
  with:
    title: ${{ github.event.issue.title }}

If a shell step is unavoidable, place the value in an environment variable and quote the variable at the point of use. Keep the script itself fixed and avoid evaluating the value as code:

- name: Record issue title
  env:
    ISSUE_TITLE: ${{ github.event.issue.title }}
  run: |
    printf '%sn' "$ISSUE_TITLE"

Do not use eval, construct shell source from context values, or concatenate untrusted input into command-line options without an appropriate parser. The same rule applies to values that are not secrets: an attacker can use a non-secret event field to reach a secret-bearing command.

Understand what log masking can and cannot do

GitHub attempts to redact a secret’s known value in workflow logs, but automatic redaction is not guaranteed. A secret can be transformed, encoded, split, compressed, serialized, or embedded in a larger value so that the resulting output no longer matches what GitHub knows to mask. Structured secret values are particularly awkward to redact reliably.

  • Never print a secret for debugging, even when masking appears to work.
  • Do not place secrets in command-line arguments when an environment variable or action input can avoid exposing them to process listings and diagnostics.
  • Avoid writing secret-bearing values to artifacts, caches, summaries, annotations, or generated files.
  • Use explicit masking for a sensitive value created during the job, before any command can print it:
VALUE=$(./ci/get-temporary-value.sh)
echo "::add-mask::$VALUE"
./ci/use-value.sh "$VALUE"

Explicit masking is an additional safeguard, not permission to log the value. If a secret appears unredacted, delete exposed logs or artifacts where GitHub allows it, revoke or rotate the credential immediately, and inspect the workflow and action path that disclosed it.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

Replace long-lived cloud keys with OIDC when supported

Storing a cloud access key and secret in GitHub secrets gives a workflow a credential that remains valid until someone revokes or rotates it. OIDC federation can instead issue a short-lived identity token for a job and let the cloud provider exchange it for temporary credentials. This removes the long-lived cloud key from GitHub’s secret store, but it is secure only when the cloud trust policy is restrictive.

Best Value
Sale
Under Desk Cable Management Tray No Drill, Metal Mesh Cable Management Under Desk with Clamp Mount, 2 Hole Cable Tray with Wire Management and Cord Organizer for Home Office Standing Desk
  • 【No Drill Mounted】Cable management tray can be assembled in as little as 3 minutes or less-simply. Side clips easily clampe the edge of desk, pass through the holes on the sides, and secure excess cables with baskets. Desk cable management supports inward or outward installation to meet your needs in different scenarios, and provides you with great convenience when collecting and organizing wires.
  • 【Rubber Pad Protects Desk】Wire organizer under desk built-in soft rubber pads on the clamp protect your desk from scratches, so you will not damage your furniture or office.
  • 【Sturdy and Beautiful】Cord management under desk is made of high-quality carbon steel and holds about 15 lbs. The wire basket has 2 holes on each side of the tray to enable your cables to pass freely. Cable baskets are suitable for desk thickness use from 0.4" to 2.4".
  • 【Space Saving & Keep Organized】Desk cable management tray holds all your power cords, outlet strips, USB hubs and computer transformers hidden from your feet, and the data cables will not enter the vacuum cleaner to keep your desk clean and tidy. Desk wire organizer is also suitable for use in the kitchen and outdoors.
  • 【Reduce Safety Risks】Cable tray under desk keeps all plugs away from your kids, no more worry about tripping. Using 2 holes wire tray saves extra space, helps you easily cabling and wire protection. The mesh design is not easy to accumulate dust, but avoids safety accidents caused by messy wires.
Decision point Stored cloud secret OIDC federation
Credential lifetime Long-lived until rotation or revocation Short-lived token and provider-issued session, subject to provider rules
GitHub exposure Secret is available to any permitted job that references it No long-lived cloud key needs to be stored as a GitHub secret
Workflow permission Only the permissions needed for the job’s GitHub operations Usually id-token: write plus the GitHub scopes the job needs
Cloud trust Usually tied to the stored key’s account or role Must validate claims such as audience and subject
Approval boundary Can be placed in an environment with reviewers Can also be limited to an environment and a reviewer-gated deployment job
Failure mode Stolen key may work until detected and rotated Overly broad trust policy may let unintended repositories or workflows assume the role

Configure both sides of the federation

  1. Enable the cloud provider’s GitHub OIDC integration and identify the expected token audience.
  2. Create a cloud role or service identity with only the deployment actions and resources required.
  3. Set a trust policy that requires the expected audience and a restrictive subject claim. Bind the subject to the intended repository and, where appropriate, branch, tag, environment, or reusable workflow.
  4. Add id-token: write only to the deployment job, alongside the minimum GitHub permissions.
  5. Use the provider’s supported login action at a pinned commit and request temporary credentials for the deployment.
  6. Test a non-production role first, then verify that a different repository, branch, or environment cannot assume it.

A trust policy that accepts any repository in an organization, or any workflow from the intended repository, is broader than most deployment boundaries require. OIDC removes one class of stored secret; it does not remove the need to constrain identity, permissions, and approval.

Treat actions and reusable workflows as supply-chain code

An action executes with the permissions and secrets available to its step or job. A tag such as @v4 can move to a new commit, while a compromised or poorly maintained action can read credentials exposed to it. Pin third-party actions and reusable workflows to a verified full commit SHA, and review the repository and release provenance before granting access to sensitive jobs.

- uses: actions/checkout@40c...<full-verified-commit-sha>

A pinned reference is not permanently safe: it can contain a vulnerability or become stale. Maintain a process for reviewing and updating pinned SHAs, using automated dependency update tooling where appropriate, and test updates in a lower-risk workflow before changing a production deployment. Keep actions that need secrets in a small, dedicated job rather than placing them in every build step.

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

Build a safer deployment workflow

The following pattern separates untrusted validation from a reviewer-gated deployment. Adapt permissions and action references to the operations your repository actually performs.

name: Build and deploy

on:
  pull_request:
  push:
    branches: [main]

permissions:
  contents: read

jobs:
  test:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@<verified-full-commit-sha>
      - run: ./ci/test.sh

  deploy:
    if: github.event_name == 'push' && github.ref == 'refs/heads/main'
    needs: test
    environment: production
    runs-on: ubuntu-latest
    permissions:
      contents: read
      id-token: write
    steps:
      - uses: actions/checkout@<verified-full-commit-sha>
      - name: Authenticate with cloud provider
        uses: example/cloud-login@<verified-full-commit-sha>
      - name: Deploy
        run: ./ci/deploy.sh
  • The test job receives no deployment credential and uses read-only contents access.
  • The deploy job runs only for a push to the protected default branch, not for an arbitrary fork pull request.
  • The production environment can require human approval before the job starts and its secrets become available.
  • OIDC is requested only where it is needed; the cloud trust policy still determines the resulting cloud authority.

Audit checklist before enabling a secret-bearing workflow

  • List every secret, its owner, purpose, expiry or rotation method, and the exact jobs that can read it.
  • Move production values to an environment and configure required reviewers or equivalent protection.
  • Set workflow-level permissions to the minimum baseline, then review each job’s overrides.
  • Confirm that fork and Dependabot pull requests cannot reach deployment jobs or write-capable tokens.
  • Review every pull_request_target workflow for checkout and execution of untrusted files.
  • Search workflow scripts for direct interpolation of event context into shell source.
  • Check that secrets are not printed, uploaded as artifacts, written to caches, or included in summaries.
  • Pin third-party actions and reusable workflows to verified full commit SHAs and schedule updates.
  • For OIDC, test the cloud trust policy with an unintended branch, repository, and environment to verify that each is rejected.
  • Document the rotation and incident procedure before the first production run.

Respond when a secret may have leaked

  1. Stop or disable the affected workflow and prevent additional runs from using the credential.
  2. Revoke or rotate the secret at the system that issued it; do not wait for log deletion to make it safe.
  3. Delete exposed workflow logs, artifacts, caches, and summaries where GitHub permits removal, while preserving only the evidence needed for the incident investigation.
  4. Review repository audit records, workflow changes, action versions, pull-request events, and outbound destinations to determine how the value was disclosed.
  5. Replace the credential in the correct repository, organization, or environment scope and update dependent systems.
  6. Add a regression check or policy rule so the same logging, permission, or trigger path cannot recur.

Rotation is required even if the value appeared masked: masking changes display, not the credential’s validity. If the incident involved a cloud role, review issued sessions and narrow the provider trust policy before re-enabling deployment.

When stored secrets remain appropriate

OIDC is preferable for supported cloud deployments, but not every service supports federation. A repository, organization, or environment secret can still be appropriate for a non-cloud API, a signing service, or a legacy system when you apply a short rotation interval, narrow permissions, environment approval, and strict job isolation. Store only the value the job needs, use separate credentials for production and non-production, and avoid copying a production secret into a broad organization scope.

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.

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