Skip to content

Commit

Permalink
ci(datadog): Adding static code analysis
Browse files Browse the repository at this point in the history
Signed-off-by: Vincent Boutour <bob@vibioh.fr>
  • Loading branch information
ViBiOh committed Mar 19, 2024
1 parent a96a637 commit ed44dd8
Show file tree
Hide file tree
Showing 3 changed files with 90 additions and 0 deletions.
43 changes: 43 additions & 0 deletions .github/workflows/datadog-sca.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
---
name: Datadog Software Composition Analysis

permissions:
actions: none
checks: none
contents: read
deployments: none
issues: none
packages: none
pages: none
pull-requests: none
repository-projects: none
security-events: none

on:
push:
branches:
- main
pull_request:
branches:
- main

defaults:
run:
shell: bash

jobs:
software-composition-analysis:
runs-on: ubuntu-latest
name: Datadog SBOM Generation and Upload
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Check imported libraries are secure and compliant
id: datadog-software-composition-analysis
uses: DataDog/datadog-sca-github-action@main
with:
dd_api_key: ${{ secrets.DD_API_KEY }}
dd_app_key: ${{ secrets.DD_APP_KEY }}
dd_service: goweb
dd_env: ci
dd_site: datadoghq.eu
44 changes: 44 additions & 0 deletions .github/workflows/datadog-static-analysis.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
---
name: Datadog Static Analysis

permissions:
actions: none
checks: none
contents: read
deployments: none
issues: none
packages: none
pages: none
pull-requests: none
repository-projects: none
security-events: none

on:
push:
branches:
- main
pull_request:
branches:
- main

defaults:
run:
shell: bash

jobs:
static-analysis:
runs-on: ubuntu-latest
name: Datadog Static Analyzer
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Check code meets quality and security standards
id: datadog-static-analysis
uses: DataDog/datadog-static-analyzer-github-action@v1
with:
dd_api_key: ${{ secrets.DD_API_KEY }}
dd_app_key: ${{ secrets.DD_APP_KEY }}
dd_service: goweb
dd_env: ci
dd_site: datadoghq.eu
cpu_count: 2
3 changes: 3 additions & 0 deletions static-analysis.datadog.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
---
rulesets:
- docker-best-practices # ensure best practices are followed

0 comments on commit ed44dd8

Please sign in to comment.