Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add TruffleHog version input for GitHub action #1064

Merged
merged 1 commit into from
Feb 2, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,12 @@ description: 'Scan Github Actions with TruffleHog'
author: Truffle Security Co. <support@trufflesec.com>

inputs:
version:
description: TruffleHog version.
required: false
default: latest
path:
description: Repository path
description: Repository path.
required: true
base:
description: Start scanning from here (usually main branch).
Expand All @@ -22,7 +26,7 @@ branding:
color: "green"
runs:
using: "docker"
image: "docker://ghcr.io/trufflesecurity/trufflehog:latest"
image: "docker://ghcr.io/trufflesecurity/trufflehog:${{ inputs.version }}"
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't really think that the image field accepts the Github's expression syntax. It pretty much broke the workflow that I'm using. (Like what @james-callahan stated earlier)

One alternative is to give a default value not as seen on line 9, but to set it on this current line. In which I don't really know how to do that from the expression documentation. So like in Javascript, you'd do:

${{ input.version || 'latest' }}

But I guess that would be impossible because the expression syntax treats || as an OR operator.

args:
- git
- file://${{ inputs.path }}
Expand Down