Skip to content
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
4 changes: 4 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ on:
jobs:
test:
runs-on: ubuntu-latest
permissions: write-all

strategy:
matrix:
Expand All @@ -20,6 +21,9 @@ jobs:
- uses: gitleaks/gitleaks-action@v2
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GITLEAKS_ENABLE_UPLOAD_ARTIFACT: 'false'
GITLEAKS_VERSION: '8.28.0'
GITLEAKS_LOG_LEVEL: 'trace'

- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v4
Expand Down
21 changes: 21 additions & 0 deletions .gitleaks.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
title = "Custom Gitleaks Config for GC Secrets"

# Extend the default gitleaks config to keep all standard rules
[extend]
useDefault = true

# Any line with gc_client_id and a value
[[rules]]
id = "gc-client-id-any"
description = "Any line with gc_client_id and a value"
regex = '''(?i)gc_client_id.*[:=].*\S+'''
keywords = ["gc_client_id"]
tags = ["gc", "client", "id"]

# Any line with gc_client_secret and a value
[[rules]]
id = "gc-client-secret-any"
description = "Any line with gc_client_secret and a value"
regex = '''(?i)gc_client_secret.*[:=].*\S+'''
keywords = ["gc_client_secret"]
tags = ["gc", "client", "secret"]
2 changes: 1 addition & 1 deletion src/handler.ts
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@
queryStringParameters: null,
multiValueQueryStringParameters: null,
stageVariables: null,
requestContext: {} as any,

Check warning on line 65 in src/handler.ts

View workflow job for this annotation

GitHub Actions / test (22.x)

Unexpected any. Specify a different type
resource: '/test'
};

Expand All @@ -70,7 +70,7 @@
clientContext: {
gc_client_id: '',
gc_client_secret: '',
gc_aws_region: 'us-east-1'
gc_aws_region: '',
}
};

Expand Down