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

ci: synced file(s) with honestbank/.github #129

Open
wants to merge 1 commit into
base: main
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
6 changes: 3 additions & 3 deletions .github/workflows/semantic-pr.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
# Use this workflow for public repos, since public repos cannot access our internal
# workflows repo.
---
name: semantic-pull-request
name: public-semantic-pr
permissions:
contents: write
pull-requests: write
Expand All @@ -18,8 +18,8 @@ on:
- synchronize

jobs:
semantic-pull-request:
name: semantic-pull-request
public-semantic-pr:
name: public-semantic-pr
runs-on: ubuntu-latest
steps:
- uses: amannn/action-semantic-pull-request@v4
Expand Down
4 changes: 0 additions & 4 deletions .github/workflows/terraform.yaml
Original file line number Diff line number Diff line change
@@ -1,13 +1,9 @@
name: "Terraform GitHub Action"

Check failure on line 1 in .github/workflows/terraform.yaml

View workflow job for this annotation

GitHub Actions / checkov

CKV2_GHA_1: "Ensure top-level permissions are not set to write-all"
on:
pull_request:
# This workflow is meant for public Terraform module repositories
# which are generally component modules that follow trunk-based development.
branches: [main]

permissions:
contents: read # Only read access to repository contents

jobs:
terraform:
name: "terraform"
Expand Down
26 changes: 5 additions & 21 deletions .github/workflows/terratest.yaml
Original file line number Diff line number Diff line change
@@ -1,17 +1,14 @@
name: "Terratest GitHub Action"

Check failure on line 1 in .github/workflows/terratest.yaml

View workflow job for this annotation

GitHub Actions / checkov

CKV2_GHA_1: "Ensure top-level permissions are not set to write-all"
on:
pull_request:
branches: [test, dev, qa, prod, main]
push:
branches: [test, dev, qa, prod, main]

permissions:
contents: read # Only read access to repository contents
id-token: write # Required for Google Actions auth

env:
TERRATEST_GOOGLE_CREDENTIALS_NETWORK: ${{secrets.TERRATEST_GOOGLE_CREDENTIALS_NETWORK}}
TERRATEST_GOOGLE_CREDENTIALS_COMPUTE: ${{secrets.TERRATEST_GOOGLE_CREDENTIALS_COMPUTE}}
AWS_ACCESS_KEY_ID: ${{ secrets.TERRATEST_AWS_ACCESS_KEY_ID }}
AWS_SECRET_KEY: ${{ secrets.TERRATEST_AWS_SECRET_ACCESS_KEY }}
AWS_DEFAULT_REGION: ${{ secrets.TERRATEST_AWS_REGION }}
AWS_REGION: ${{ secrets.TERRATEST_AWS_REGION }}
jobs:
terratest:
name: terratest
Expand All @@ -24,21 +21,8 @@
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: 1.22
go-version: 1.20
id: go
- name: Install Terraform
uses: hashicorp/setup-terraform@v3
with:
terraform_version: "1.9.0"
- name: 'auth'
uses: 'google-github-actions/auth@v2'
with:
credentials_json: '${{ secrets.TERRATEST_GOOGLE_CREDENTIALS_COMPUTE }}'
- name: 'Set up Cloud SDK'
uses: 'google-github-actions/setup-gcloud@v2'
with:
version: '>= 363.0.0'
install_components: 'gke-gcloud-auth-plugin'
- name: Run 'go test -v -timeout 60m'
run: |
cd test
Expand Down
30 changes: 30 additions & 0 deletions .github/workflows/trivy.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
---
name: Trivy Security Scan

# permissions required for the action, restricting to read-only for repository contents.
permissions:
contents: read

on:
pull_request:
branches:
- main

jobs:
trivy-security-scan:
name: Run Trivy Security Scan
runs-on: ubuntu-latest

steps:
- name: Checkout Repository
uses: actions/checkout@v4
with:
submodules: "recursive" # Ensure any submodules are included in the scan.
token: ${{ secrets.ENGINEERING_GITHUB_PERSONAL_ACCESS_TOKEN }}

# Run Trivy Configuration Scan with specified options.
- name: Run Trivy Security Scan
uses: aquasecurity/[email protected]
with:
scan-type: 'config'
trivy-config: 'trivy.yaml'
Loading