Skip to content
This repository has been archived by the owner on Jun 6, 2023. It is now read-only.

CORE-4385 #1

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
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
1 change: 1 addition & 0 deletions .github/CODEOWNERS
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
/.github/* @bombbomb/Dev-Admins
22 changes: 22 additions & 0 deletions .github/workflows/ripsecrets.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
name: RipSecrets
on: [pull_request]
jobs:
ripsecrets:
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v3
with:
fetch-depth: 0

- name: Download ripsecrets
run: |
wget https://static.bombbomb.com/ci/ripsecrets.tar.gz
tar -xzf ripsecrets.tar.gz
chmod +x ripsecrets
sudo mv ripsecrets /usr/local/bin

- name: Run ripsecrets
run: |
ripsecrets `git diff origin/${{ github.base_ref }} --name-only --diff-filter=ACM`
7 changes: 7 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
repos:
- repo: https://github.com/sirwart/ripsecrets
rev: v0.1.5 # Use latest tag on GitHub
hooks:
- id: ripsecrets
stages: [commit]

4 changes: 4 additions & 0 deletions .secretsignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#full filepaths go here

[secrets]
#individual secrets go here
7 changes: 7 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -176,3 +176,10 @@ If the filename ends with `.url` suffix, the content will be processed as an URL
- description: Set to true to enable pulling of 5XX response content from config map. Used in case if the filename ends with `.url` suffix (Please refer to the `*.url` feature here.)
- required: false
- type: boolean

RipSecrets<br><br>
We implement pipeline secret scanning on all pull request events to prevent credentials from being merged. If the pipeline scanner detects a secret in your changed files it will gate the pull request and you will need to purge the found credential from your code and re-open the PR. To prevent getting gated by this tool and as best practice you should install the secret scanner locally in a pre-commit hook to prevent the secret from ever being committed to the repo in the first place. You can find documentation on how to set it up locally [here](https://bombbomb.atlassian.net/wiki/spaces/CORE/pages/2039775312/Pipeline+Secret+Scanner+Local+Setup)<br>
Ripsecrets has ways to bypass secret scanning although we should not be ignoring secrets that turn up in the scans. If something is out of your control and blocking the pipeline you can bypass it in one of the following ways<br>
1. Adding "# pragma: allowlist secret" to the end of the line with the secret.<br>
2. Adding the specific secret underneath the "[secrets]" block in .secretsignore<br>
3. Adding the filepath to ignore the whole file aboove the "[secrets]" block in .secretsignore