Skip to content

Commit

Permalink
Add github action (#295)
Browse files Browse the repository at this point in the history
  • Loading branch information
bill-rich authored Apr 8, 2022
1 parent bf5c757 commit ecd6da0
Show file tree
Hide file tree
Showing 3 changed files with 37 additions and 1 deletion.
7 changes: 6 additions & 1 deletion .github/workflows/dogfood.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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 changes: 27 additions & 0 deletions action.yml
Original file line number Diff line number Diff line change
@@ -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 changes: 4 additions & 0 deletions entrypoint.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#! /usr/bin/env bash

args=("$@")
/usr/bin/trufflehog ${args[@]}

0 comments on commit ecd6da0

Please sign in to comment.