This is part 8 of the series "Protect Your Own Service Yourself — Self-Defense Security in the Age of AI." Do the checks you can yourself; when it's hard, EarthLink Network can run the assessment for you, and fix the gaps you can't fix on your own.
Series contents
- Anyone can attack now, with AI — check your own site first
- What attackers now hold: when AI runs the attack itself
- Before you start: the whole picture of checking, and how to test without breaking production
- Testing from the outside (1): setup and the first run
- Testing from the outside (2): attack tools and legitimate scanners find different things
- Checking the code you wrote: static analysis
- Checking the parts you depend on: libraries and packages
- Checking your infrastructure settings for gaps (this article)
- Collect every result in one place and decide what to fix first (coming soon)
- How to fix what you found: three ways (coming soon)
- When you cannot fix it yourself: a maintenance contract (coming soon)
- Keep checking automatically every day — from building to protecting (coming soon)
The short version
Trivy reported 19 problems in the settings of the three storage buckets behind our production service. Fifteen were one complaint, "no public access block," and the setting was there all along. The export tool never wrote it down, so the scanner assumed it was missing. A scanner's count is not your count of gaps.
Our service, promptflow, was built with AWS CLI commands and shell scripts. There is no Terraform and no AWS CDK, and most infrastructure scanners read exactly those files. So we tried three read-only paths with free tools:
- Scan the deployment pipeline. zizmor, Checkov, and Trivy on 27 GitHub Actions workflows. zizmor showed 133 findings. Two of its five high-severity injection findings were real; we fixed them, plus a missing permissions block that Checkov flagged too, and pinned the five third-party actions.
- Write the live settings out as code, then scan. Terraformer exported our three S3 buckets; that is where the 19 came from.
- Scan the whole account. Prowler ran all 655 checks under a role that reads settings but not data.
None of our three buckets could be read, written, or listed by the public.
Why settings matter on their own
Your code can be clean and your dependencies patched, and a single setting can still expose data. The common ones:
- Storage anyone can read. A misconfigured S3 bucket serves its contents to the whole internet. Leaks like this keep happening, worldwide.
- Permissions wider than the job. If a program or person has more access than they need, a stolen access key does more damage.
- Missing encryption. Unencrypted data is readable as-is by anyone who gets into the storage.
- Missing logs. Without a record of who did what, you can't reconstruct an incident afterwards.
None of these involve a bug in your code, which is why they need a check of their own, separate from the code scan in Part 6 and the dependency scan in Part 7.
| Path | What it checks | Tools (all free) | Where we ran it |
|---|---|---|---|
| 1. Scan the pipeline | How the deployment is written | zizmor, Checkov, Trivy | Our Mac, on a copy of the workflow files |
| 2. Export and scan | Current values of live settings | Terraformer, then Checkov and Trivy | Our Mac, S3 only |
| 3. Read-only account scan | Settings across the whole account | Prowler | GitHub Actions, with a settings-only role |
Nothing in production was changed. Path 1 never touched AWS. Paths 2 and 3 read from AWS and wrote nothing.
Path 1: scan the deployment pipeline
A deployment pipeline has direct access to production. Our GitHub Actions workflows receive AWS credentials and the right to ship code. If someone can tamper with a workflow, they can ship whatever they like or walk away with the credentials. That makes the pipeline part of your infrastructure.
zizmor
zizmor is a free, MIT-licensed scanner for GitHub Actions workflows. It is distributed as a Python package; we installed it with pip. You point it at the workflow folder:
zizmor .github/workflows 352 findings, 219 suppressed by the tool's defaults, 133 shown: 97 high, 3 medium, 20 low, 13 informational. (In the terminal images in this part, the output lines are exactly as they appeared; the command lines were written in afterwards to match that output.) That sounds alarming until you group them:
| Audit | Count | What it means |
|---|---|---|
| unpinned-uses | 80 | An action is referenced by a movable tag such as @v7 instead of a commit hash |
| template-injection | 18 (5 high, 13 informational) | An outside value is pasted straight into a shell command |
| artipacked | 11 | The checkout step leaves GitHub credentials in the workspace |
| cache-poisoning | 9 | A release workflow uses a shared cache |
| adhoc-packages | 6 | A package is installed outside the lockfile |
| excessive-permissions | 4 | Permissions broader than needed, or none set |
| other | 5 | Secrets passed wholesale to another workflow (2), and so on |
The 80 unpinned references are worth understanding. A tag like v7 can be moved by whoever controls the action's repository. If that account is compromised, the tag can point to new code, and every workflow that uses it runs that code. This happened in March 2025, when the popular action tj-actions/changed-files was compromised and secrets were exposed in workflow logs.
In our case, 75 of the 80 were GitHub's own actions (actions/checkout and friends). Only 5 came from other publishers: two for uploading to Google Play, two from AWS, one for Android. We pinned those five to full commit hashes. zizmor's defaults ask you to pin everything, including GitHub's own actions. We chose to keep GitHub's own actions on version tags and pin only third-party ones.
Real, or not? Check who controls the value
We then went through the five high-severity template-injection findings one by one, with the workflow open:
- Real (2): test-portal-reingest.yml, lines 62 and 96. A manual-run input went straight into a shell command without any check. Only people with write access to the repository can start a manual run, so this was not open to the world, but it was still worth fixing. We now pass the input through an environment variable and read it from there.
- Blocked earlier in the job (2): rollback.yml, lines 166 and 173. The same kind of input, but an earlier step in the same job (line 77) stops the run unless the value looks like
1.2.3. The scanner doesn't follow that earlier check. - No way for an outsider to supply the value (1): staging-e2e.yml, line 116. The value is a commit hash, and the workflow runs only when started by hand or when our tag-triggered release workflow (deploy-on-tag) finishes; both require write access.
The two questions that decide it: who controls the value, and is it validated before use? A scanner matches patterns; it can't answer either question for you.
Checkov and Trivy on the same folder
Checkov passed 1,661 checks and failed 11. Ten are the same rule: manual-run inputs should be empty. That rule comes from a strict build-provenance standard. The ten workflows it flagged (deploy, rollback, changelog, test-result re-ingest and others) take what to work on as a manual-run input on purpose, so having an input is intended. How an input is used is a separate question: where it was pasted into a command unchecked, as in test-portal-reingest.yml, we fixed it as described above.
The eleventh is deploy.yml with no permissions set, the same spot zizmor flagged. That workflow only calls a webhook and doesn't need the GitHub token at all, so we added permissions: {}. When two independent tools point at the same line, take it seriously.
After the fixes, we ran zizmor again: the injection findings in the fixed workflow and the unpinned third-party actions were gone.
Watch the Trivy result. "0" means scanned and clean. "-" means not scanned. Trivy's config scanner reads Terraform, Dockerfiles, Kubernetes manifests and the like, not GitHub Actions workflows or shell scripts. Our pipeline folder had nothing it could read. Mistaking "-" for "0" is how you end up trusting something nobody checked.
Path 2: write the live settings out as code, then scan them
If there are no settings files, make some. Terraformer (Apache-2.0) reads your current cloud resources and writes them out as Terraform files, which Checkov and Trivy can then scan.
One caution first: the official Terraformer repository was archived by its owner in March 2026 and is now read-only. It still works, but don't expect it to keep up with new cloud features. We hit exactly that kind of gap.
Step 1: give it read-only credentials and import
Terraformer queries AWS, so it needs credentials. Give it read-only ones; there is no reason for an import tool to be able to change anything.
Our first run failed because no credentials reached it. "no EC2 IMDS role found" means it looked everywhere and found none. If you see that, fix how the credentials are passed in.
The second run read 45 S3 resources. Our AWS account is shared with other products, so most of those were not ours. We kept the 4 whose names contain promptflow (3 buckets and 1 bucket policy) and scanned only those. In a shared account, narrowing to your own service is a required step, not a nicety. This export covers S3.
Step 2: scan the written-out files
checkov -d pf-only trivy config pf-only Fifteen of Trivy's 19 are one issue counted five ways across three buckets.
Step 3: decide, finding by finding
No public access block (Checkov 3, Trivy 15): produced by the export. Open the written-out file and the setting isn't there at all. Terraformer's S3 import writes buckets and bucket policies; it does not write the public access block. The scanners are reporting the absence of something that was never exported. Our deployment script, meanwhile, turns all four public access block settings on when it creates the log bucket:
The other two buckets aren't covered by that script, and AWS documents that new buckets block public access by default. We didn't settle it on the script and the docs alone; we read the real values. Both Prowler (path 3) and the AWS CLI (aws s3api get-public-access-block) showed all four settings on for all three buckets. All 18 of these findings were false positives. If you use the export route, the public access block isn't in the export, so read it separately with the AWS CLI.
The checks that look for a public-read or public-write ACL (CKV_AWS_20, CKV_AWS_57) passed for all three buckets, and the check for a policy that allows any principal (CKV_AWS_70) passed on the log bucket, the only one with a policy. That policy lets only the S3 logging service write, and only logs coming from promptflow buckets in our own account.
The rest: logging, intended settings, and choices
No access logging (Checkov 2, Trivy 1): a per-bucket check; the one on the log bucket is intended. Access logs record who read or wrote what, and when. A service runs fine without them, which is exactly why they get missed. The tools flag each bucket that has no logging block. Without those logs there is nothing to trace after an incident, so the fix for a flagged bucket is to send its access logs to a dedicated log bucket. promptflow's logging script is built to do this for buckets whose names start with promptflow-. The exception is the log bucket itself: the script deliberately skips it, because logging the log bucket generates logs about logs forever.
Versioning off (Checkov 1, Trivy 1): intended. Only the log bucket has it off, and that bucket exists to expire logs after 90 days.
Not encrypted with a customer-managed key (Checkov 3, Trivy 2): a choice, not a gap. All three buckets are encrypted with AWS-managed keys (AES256), and the basic encryption check (CKV_AWS_19) passed for all three. The tools want KMS keys you manage yourself. As Trivy's own text notes, a server-access-log destination bucket can't use that, so Checkov's finding on the log bucket doesn't apply.
No lifecycle rule, event notifications or cross-region replication (Checkov 7): not security gaps for us. Those are about cost and resilience.
Out of 35 findings across both tools, the most frequent one, "no public access block" (18 findings), turned out to be all on once we read the values. The rest were intended settings, cost and resilience choices, and the per-bucket logging check. Scanner counts are not gap counts.
Path 3: scan the whole account, read-only
The third path lets a tool read the account's settings directly: IAM, logging, encryption, bucket exposure, network rules. No export step, so nothing gets lost in translation.
Prowler is a common choice. Its CLI is Apache-2.0, and its pricing page says so plainly. The paid Prowler Cloud ($99 per cloud account per month) adds scheduling, dashboards and integrations; the checks themselves are free.
Why we stopped the first run
We first started Prowler with a role named ReadOnlyAccess that was already at hand:
We stopped it right away, for two reasons.
First, "read-only" is wider than it sounds. AWS's managed ReadOnlyAccess policy includes s3:Get*, which means it can read the contents of files in your buckets, not just their settings. A scanner needs settings, not customer data. Prowler's own documentation asks for SecurityAudit and ViewOnlyAccess (plus a small extra read-only policy for some checks). SecurityAudit, on the S3 side, reads configuration and does not include s3:GetObject.
Second, the account is shared, so results would mix in other products' resources.
A settings-only role, run to the end
We built the dedicated role for GitHub Actions. It has exactly two policies attached, SecurityAudit and ViewOnlyAccess, and not ReadOnlyAccess. Each run, GitHub Actions assumes the role through OIDC and receives credentials that last at most one hour. There is no long-lived access key to store, so there is no stored key to leak. Only workflows in our blog's repository can assume the role.
With that role, Prowler ran all 655 checks across every region except two, in about 49 minutes.
The report covers the whole account, so we filtered it to promptflow. First, the question path 2 couldn't answer: the public access block. All three buckets passed.
Then the checks Prowler rates critical: can anyone write to, read, or list the bucket? Three buckets times three checks, nine rows, all PASS.
In the same workflow, we also read the three buckets with the AWS CLI (aws s3api get-public-access-block), separately from Prowler: all four settings true on each. Getting the same answer from a second, independent read is what keeps an export gap like the one in path 2 from sending you in circles.
What we don't turn on
AWS Config, Security Hub and Inspector watch your settings continuously, and they bill by usage. In this series we stick to what we can do at no cost: free tools, read-only, run when we need them.
What each path sees
| Path | Sees | Misses |
|---|---|---|
| 1. Scan the pipeline | How the deployment is written: permissions, injected values, how actions are referenced | What is configured right now |
| 2. Export and scan | Current values for whatever was exported | Anything the export leaves out (here, the public access block) |
| 3. Read-only account scan | Current values across the account | How the pipeline is written; needs a dedicated role first |
No single path covers it all. Path 1 checks how things are written; paths 2 and 3 check current values. Given that Terraformer is archived, our approach is to use path 3 for current values and keep path 2 as a starting draft if we ever move to infrastructure-as-code.
Next
Part 9 brings every result from this series into one place and decides what to fix first: outside-in testing, our own code, our dependencies, and the infrastructure settings from this part. Results from different tools come in different shapes; we line them up and rank them by severity, how easy they are to exploit, and whether they can be reached from outside.
In this series, in an age when attack tools are free and one click away for anyone, I show step by step how to check your own service yourself and close the gaps before someone else finds them. The target is always our own service; the series does not cover attacking anyone else's site.
If running the checks yourself is hard, EarthLink Network can do the assessment for you. Found a gap you can't fix? We'll handle the fix. Feel free to reach out.
If this was useful, please like and follow.
Our products are listed at https://www.eln.ne.jp/products
EarthLink Network builds its own products to run the whole company on AI — each one born from a need along the way. See the full index of what we build:
→ The 18 products EarthLink Network builds in-house
For more about the company and each product, visit www.eln.ne.jp.













