mirror of
https://github.com/trufflesecurity/trufflehog.git
synced 2024-11-10 07:04:24 +00:00
Add github action (#295)
This commit is contained in:
parent
bf5c757cd3
commit
ecd6da07ea
3 changed files with 37 additions and 1 deletions
7
.github/workflows/dogfood.yml
vendored
7
.github/workflows/dogfood.yml
vendored
|
@ -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
27
action.yml
Normal 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
4
entrypoint.sh
Normal file
|
@ -0,0 +1,4 @@
|
|||
#! /usr/bin/env bash
|
||||
|
||||
args=("$@")
|
||||
/usr/bin/trufflehog ${args[@]}
|
Loading…
Reference in a new issue