Skip to content

Commit 992b15b

Browse files
committed
Add snapshot test
1 parent acaaef1 commit 992b15b

File tree

2 files changed

+14
-5
lines changed

2 files changed

+14
-5
lines changed

tests/integration/snapshot.rs

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -533,3 +533,14 @@ fn unredacted_secrets() -> Result<()> {
533533

534534
Ok(())
535535
}
536+
537+
#[test]
538+
fn secrets_outside_environment() -> Result<()> {
539+
insta::assert_snapshot!(
540+
zizmor()
541+
.input(input_under_test("secrets-outside-environment.yml"))
542+
.run()?
543+
);
544+
545+
Ok(())
546+
}
Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,10 @@
1-
name: Action
21
on: push
2+
permissions: {}
33
jobs:
44
build:
5-
name: Job
65
runs-on: ubuntu-latest
76
steps:
8-
- name: Docker setup
9-
uses: actions_repo/actions/docker@main
7+
- uses: actions_repo/actions/docker@main
108
with:
11-
username: ${{ secrets.DOCKERHUB_USERNAME }}
9+
# NOT OK: Anyone with write access can exfiltrate this secret.
1210
password: ${{ secrets.DOCKERHUB_PASSWORD }}

0 commit comments

Comments
 (0)