Add github action (#295)

This commit is contained in:
Bill Rich
2022-04-08 14:33:55 -07:00
committed by GitHub
parent bf5c757cd3
commit ecd6da07ea
3 changed files with 37 additions and 1 deletions
+6 -1
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
View File
@@ -0,0 +1,27 @@
name: 'TruffleHog'
description: 'Scan Github Actions with TruffleHog'
author: Truffle Security Co. <[email protected]>
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
View File
@@ -0,0 +1,4 @@
#! /usr/bin/env bash
args=("$@")
/usr/bin/trufflehog ${args[@]}