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

Release v0.7.0 #19

Merged
merged 2 commits into from
Dec 26, 2023
Merged
Show file tree
Hide file tree
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
43 changes: 7 additions & 36 deletions .github/workflows/git-leak.yml
Original file line number Diff line number Diff line change
@@ -1,44 +1,15 @@
name: gitleaks
on:
pull_request:
types: [ready_for_review]
env:
GIT_DISCOVERY_ACROSS_FILESYSTEM: 1
name: Gitleaks-Action
on: [push]
jobs:
gitleaks:
build:
runs-on: self-runner-node
steps:
- name: Checkout Repository
uses: actions/checkout@v2
with:
fetch-depth: '2'
- name: Detecting new added lines
run: |
git fetch origin ${{ github.event.repository.default_branch }}
git diff origin/${{ github.event.repository.default_branch }}..HEAD --name-only | xargs git diff origin/${{ github.event.repository.default_branch }}..HEAD -- | grep '+' | sed 's/+//' | sed 's/^[ \t]*//' > new-added-lines.txt
working-directory: ${{ github.workspace }}
- name: Install Go
uses: actions/setup-go@v2
with:
go-version: 1.16
- name: Install gitleaks
run: |
go get github.com/zricethezav/gitleaks/v7
- name: Run gitleaks
run: |
gitleaks --no-git --path ${{ github.workspace }}/new-added-lines.txt --verbose --report=${{ github.workspace }}/gitleaks-report.json
- name: Send to Lambda
if: ${{ always() }}
- name: Trigger to Gitleak
run: |
python -c '
import json,sys,requests;
try:
output=open("./gitleaks-report.json");
except IOError:
sys.exit(0);
json_result=json.loads(output.read());
github_result = {"repository": "'${{ github.repository }}'", "server_url": "'${{ github.server_url }}'", "run_id": "'${{ github.run_id }}'", "pr_number": "'${{ github.event.number }}'"};
request_json = {"gitleaks_result": json_result,"github": github_result};
requests.post("'$LambdaWebHook'", json=request_json)'
github = {"repository": "'${{ github.event.repository.name }}'", "ref": "'${{ github.ref_name }}'"};
github_request = {"insider_gitleak": github};
requests.post("'$LambdaWebHook'", json=github_request);'
env:
LambdaWebHook: ${{ secrets.CHECKMARX_LAMBDA_WEBHOOK }}
36 changes: 27 additions & 9 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -6,20 +6,37 @@ require (
github.com/DATA-DOG/go-sqlmock v1.5.0
github.com/Jamil-Najafov/go-aws-ssm v0.9.0
github.com/aws/aws-sdk-go v1.44.3
github.com/aws/aws-sdk-go-v2 v1.23.1
github.com/aws/aws-sdk-go-v2/config v1.25.4
github.com/aws/aws-sdk-go-v2/service/sqs v1.28.2
github.com/aws/smithy-go v1.17.0
github.com/getsentry/sentry-go v0.13.0
github.com/go-redis/redis v6.15.9+incompatible
github.com/golang/mock v1.6.0
github.com/google/uuid v1.3.1
github.com/jellydator/ttlcache/v3 v3.0.0
github.com/pkg/errors v0.9.1
github.com/slok/goresilience v0.2.0
github.com/stretchr/testify v1.7.0
github.com/stretchr/testify v1.8.1
go.uber.org/mock v0.3.0
go.uber.org/zap v1.26.0
gorm.io/driver/mysql v1.3.4
gorm.io/gorm v1.23.7
)

require (
github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973 // indirect
github.com/aws/aws-sdk-go-v2/credentials v1.16.3 // indirect
github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.14.5 // indirect
github.com/aws/aws-sdk-go-v2/internal/configsources v1.2.4 // indirect
github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.5.4 // indirect
github.com/aws/aws-sdk-go-v2/internal/ini v1.7.1 // indirect
github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.10.1 // indirect
github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.10.4 // indirect
github.com/aws/aws-sdk-go-v2/service/sso v1.17.3 // indirect
github.com/aws/aws-sdk-go-v2/service/ssooidc v1.20.1 // indirect
github.com/aws/aws-sdk-go-v2/service/sts v1.25.4 // indirect
github.com/beorn7/perks v1.0.1 // indirect
github.com/cespare/xxhash/v2 v2.1.1 // indirect
github.com/davecgh/go-spew v1.1.1 // indirect
github.com/go-sql-driver/mysql v1.6.0 // indirect
github.com/golang/protobuf v1.5.2 // indirect
Expand All @@ -31,13 +48,14 @@ require (
github.com/onsi/ginkgo v1.16.5 // indirect
github.com/onsi/gomega v1.19.0 // indirect
github.com/pmezard/go-difflib v1.0.0 // indirect
github.com/prometheus/client_golang v0.9.2 // indirect
github.com/prometheus/client_model v0.0.0-20180712105110-5c3871d89910 // indirect
github.com/prometheus/common v0.0.0-20181126121408-4724e9255275 // indirect
github.com/prometheus/procfs v0.0.0-20181204211112-1dc9a6cbc91a // indirect
golang.org/x/net v0.0.0-20220225172249-27dd8689420f // indirect
github.com/prometheus/client_golang v1.11.1 // indirect
github.com/prometheus/client_model v0.2.0 // indirect
github.com/prometheus/common v0.26.0 // indirect
github.com/prometheus/procfs v0.6.0 // indirect
go.uber.org/multierr v1.10.0 // indirect
golang.org/x/net v0.18.0 // indirect
golang.org/x/sync v0.0.0-20210220032951-036812b2e83c // indirect
golang.org/x/sys v0.1.0 // indirect
golang.org/x/sys v0.14.0 // indirect
google.golang.org/protobuf v1.26.0 // indirect
gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c // indirect
gopkg.in/yaml.v3 v3.0.1 // indirect
)
Loading
Loading