Add github action (#295)

This commit is contained in:
Bill Rich 2022-04-08 13:33:55 -08:00 committed by GitHub
parent bf5c757cd3
commit ecd6da07ea
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 37 additions and 1 deletions

View file

@ -27,4 +27,9 @@ jobs:
fetch-depth: 0
ref: ${{ github.head_ref }}
- name: Dogfood
run: echo $GITHUB_BASE_REF; CGO_ENABLED=0 go run . git file://. --since_commit $GITHUB_BASE_REF
uses: ./
id: dogfood
with:
path: ./
base: ${{ github.event.repository.default_branch }}
head: HEAD

27
action.yml Normal file
View file

@ -0,0 +1,27 @@
name: 'TruffleHog'
description: 'Scan Github Actions with TruffleHog'
author: Truffle Security Co. <support@trufflesec.com>
inputs:
path:
description: Repository path
required: true
base:
description: Start scanning from here (usually main branch).
required: true
head:
description: Scan commits until here (usually dev branch).
required: false
branding:
icon: "shield"
color: "green"
runs:
using: "docker"
image: "Dockerfile"
args:
- git
- file://${{ inputs.path }}
- --since-commit
- ${{ inputs.base }}
- --branch
- ${{ inputs.head }}

4
entrypoint.sh Normal file
View file

@ -0,0 +1,4 @@
#! /usr/bin/env bash
args=("$@")
/usr/bin/trufflehog ${args[@]}