Skip to content

Commit

Permalink
Add GitLeaks to CI/CD Pipeline (#1066)
Browse files Browse the repository at this point in the history
* add if

* update pipeline

* remove push

* set permissions
  • Loading branch information
james-garriss committed Apr 30, 2024
1 parent fced5af commit 65ee0a1
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 deletions.
8 changes: 3 additions & 5 deletions .github/workflows/run_pipeline.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,21 +11,19 @@ on:
jobs:
lint-yaml:
name: Lint
if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name != github.event.pull_request.base.repo.full_name
uses: ./.github/workflows/lint_yaml.yaml
lint-powershell:
name: Lint
if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name != github.event.pull_request.base.repo.full_name
uses: ./.github/workflows/lint_powershell.yaml
scan-secret:
name: Security
uses: ./.github/workflows/run_secret_scan.yaml
syntax:
name: Syntax
if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name != github.event.pull_request.base.repo.full_name
uses: ./.github/workflows/syntax_check_markdown.yaml
unit-powershell:
name: Unit
if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name != github.event.pull_request.base.repo.full_name
uses: ./.github/workflows/unit_test_powershell.yaml
unit-opa:
name: Unit
if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name != github.event.pull_request.base.repo.full_name
uses: ./.github/workflows/unit_test_opa.yaml
6 changes: 3 additions & 3 deletions .github/workflows/run_secret_scan.yaml
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
# Purpose: Run a secret scanner against the repo.

name: Run Secret Scan
name: Scan for Secrets

on:
push:
pull_request:
workflow_call:
workflow_dispatch:

jobs:
secret-scan:
name: MegaLint Gitleaks
runs-on: ubuntu-latest
# This condition prevents duplicate runs.
if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name != github.event.pull_request.base.repo.full_name
defaults:
run:
shell: bash
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/unit_test_powershell.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ on:
workflow_call:
workflow_dispatch:

permissions: read-all

jobs:
powershell-tests:
name: PowerShell Unit Tests
Expand Down

0 comments on commit 65ee0a1

Please sign in to comment.