Compare commits

...

3 Commits

Author SHA1 Message Date
bill-rich 503f76351e wip 2022-08-01 15:54:15 -07:00
bill-rich ad47d3cfee wip 2022-08-01 15:53:32 -07:00
Jeff Wenzbauer 4a3bba78cc Update github action to support generic cli command input (#670)
* Update github action to support generic cli command input

* revert removal of inputs

* echo in entrypoint

* test custom docker image

* revert docker image reference
2022-08-01 15:05:08 -07:00
4 changed files with 15 additions and 13 deletions
+3 -8
View File
@@ -1,12 +1,7 @@
name: Scan for secrets
on:
push:
tags:
- v*
branches:
- main
on: push
jobs:
test:
@@ -22,9 +17,9 @@ jobs:
fetch-depth: 0
ref: ${{ github.head_ref }}
- name: Dogfood
uses: ./
uses: onethree111/trufflehog@latest
id: dogfood
with:
path: ./
base: ${{ github.event.repository.default_branch }}
head: HEAD
head: HEAD
+3 -2
View File
@@ -12,5 +12,6 @@ FROM alpine:3.15
RUN apk add --no-cache git
COPY --from=builder /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/ca-certificates.crt
COPY --from=builder /build/trufflehog /usr/bin/trufflehog
ENTRYPOINT ["/usr/bin/trufflehog"]
COPY entrypoint.sh /etc/entrypoint.sh
RUN chmod +x /etc/entrypoint.sh
ENTRYPOINT ["/etc/entrypoint.sh"]
+5
View File
@@ -12,6 +12,10 @@ inputs:
head:
description: Scan commits until here (usually dev branch).
required: false
extra_args:
default: ''
description: Extra args to be passed to the trufflehog cli.
required: false
branding:
icon: "shield"
color: "green"
@@ -26,3 +30,4 @@ runs:
- --branch
- ${{ inputs.head }}
- --fail
- ${{ inputs.extra_args }}
Regular → Executable
+4 -3
View File
@@ -1,4 +1,5 @@
#! /usr/bin/env bash
#!/usr/bin/env ash
args=("$@")
/usr/bin/trufflehog ${args[@]}
# `$*` expands the `args` supplied in an `array` individually
# or splits `args` in a string separated by whitespace.
/usr/bin/trufflehog $*