Skip to content

Commit 85366a2

Browse files
authored
Merge pull request #1 from brightwheel/add-secrets-scanning-workflow
[chore] add secrets scanning workflow latest
2 parents 2572de5 + dff9fc8 commit 85366a2

3 files changed

Lines changed: 66 additions & 0 deletions

File tree

.appsec/.gitleaksignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# .gitleaksignore - fingerprint-based ignore file for secrets scanning
2+
# Format: commit:file:rule:line
3+
# Add fingerprints from scan results to ignore specific findings

.appsec/gitleaks.toml

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
# gitleaks configuration for aws-lambda-redshift-loader secrets scanning
2+
# extends base config from scanner container at /etc/appsec/scanner/gitleaks-base.toml
3+
#
4+
# add repo-specific allowlists below to handle false positives unique to this repo.
5+
# for common patterns across all repos, update the base config in appsec-tooling instead.
6+
7+
title = "aws-lambda-redshift-loader secrets scan"
8+
9+
[extend]
10+
path = "/etc/appsec/scanner/gitleaks-base.toml"
11+
12+
# uncomment and add repo-specific patterns as needed:
13+
#
14+
# [[allowlists]]
15+
# description = "test fixtures and example code"
16+
# paths = [
17+
# '''test/fixtures/.*''',
18+
# '''examples/.*''',
19+
# ]
20+
#
21+
# [[allowlists]]
22+
# description = "exact string matches to ignore"
23+
# stopwords = [
24+
# "EXAMPLE_API_KEY_NOT_REAL",
25+
# ]
26+
#
27+
# [[allowlists]]
28+
# description = "regex patterns to ignore"
29+
# regexTarget = "match"
30+
# regexes = [
31+
# '''pk_test_[a-zA-Z0-9]+''', # stripe test keys
32+
# ]
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
# GitHub Actions workflow that calls the brightwheel appsec-tooling reusable workflow for secrets
2+
# scanning on protected branches.
3+
#
4+
# DEPENDENCIES:
5+
#
6+
# * Organization-level Variable (Settings → Secrets and variables → Actions → Variables):
7+
# - APPSEC_SCANNER_PULL_ROLE_ARN: AWS IAM role ARN for ECR scanner image access via OIDC
8+
9+
name: Secrets Scan
10+
11+
on:
12+
# Automatic scanning on every push to PR branches
13+
pull_request:
14+
types: [opened, synchronize, reopened, ready_for_review]
15+
branches:
16+
- master
17+
# Manual trigger
18+
workflow_dispatch:
19+
inputs:
20+
pr_number:
21+
description: "PR number to scan (optional)"
22+
required: false
23+
ref:
24+
description: "Branch/ref to scan (optional, defaults to current)"
25+
required: false
26+
27+
jobs:
28+
scan:
29+
if: ${{ !github.event.pull_request.draft || github.event_name == 'workflow_dispatch' }}
30+
uses: brightwheel/appsec-tooling/.github/workflows/reusable-secrets-scan.yaml@main
31+
secrets: inherit

0 commit comments

Comments
 (0)