commit 29ee36f78487030b415af5ad4b1ffcca9bb40cd9 Author: Andrey Danin Date: Wed Dec 6 19:41:14 2023 +0300 Initial commit diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..9eb0d8f --- /dev/null +++ b/Dockerfile @@ -0,0 +1,6 @@ +FROM zricethezav/gitleaks:v8.18.1 + +COPY entrypoint.sh /entrypoint.sh + +ENTRYPOINT ["/entrypoint.sh"] + diff --git a/README.md b/README.md new file mode 100644 index 0000000..132d4a6 --- /dev/null +++ b/README.md @@ -0,0 +1,18 @@ +# Gitleaks docker action + +This action checks source code for security issues in pull request. + +**IMPORTANT:** this action works with pull requests only. + +## Inputs + +No inputs + +## Outputs + +No outputs + +## Example usage + +uses: actions/gitleaks-docker-action@v1 + diff --git a/action.yml b/action.yml new file mode 100644 index 0000000..2696b0e --- /dev/null +++ b/action.yml @@ -0,0 +1,8 @@ +name: 'Gitleaks docker' +description: 'Test code for secrets using Gitleaks' +inputs: +outputs: +runs: + using: 'docker' + image: 'Dockerfile' + args: [] diff --git a/entrypoint.sh b/entrypoint.sh new file mode 100755 index 0000000..b32741e --- /dev/null +++ b/entrypoint.sh @@ -0,0 +1,10 @@ +#!/bin/sh -l +# +# Copyright: +# Copyright (c) 2023. AVROID, Ltd. All Rights Reserved. +# + +echo "Processing event '$GITHUB_EVENT_NAME'" + +gitleaks detect --verbose --redact --log-opts "--first-parent --no-merges origin/$GITHUB_BASE_REF..$GITHUB_SHA" +