Skip to content
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
3 changes: 1 addition & 2 deletions .github/workflows/opendcim.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,4 @@ jobs:

steps:
- name: Update translations
run: /home/runner/update

run: /home/runner/update
123 changes: 123 additions & 0 deletions .github/workflows/security-pipeline.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,123 @@
name: Security Pipeline

permissions:
contents: read

on:
push:
branches: [mynewfeature-patch,master]
pull_request:
branches: [mynewfeature-patch,master]

concurrency:

group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
gitleaks:
runs-on: ubuntu-latest
permissions:
contents: read
pull-requests: write

steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
fetch-depth: 0
persist-credentials: false

- uses: gitleaks/gitleaks-action@e0c47f4f8be36e29cdc102c57e68cb5cbf0e8d1e # v3.0.0
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

sast:
runs-on: ubuntu-24.04
timeout-minutes: 10
permissions:
contents: read

steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2

- name: Semgrep
uses: returntocorp/semgrep-action@713efdd345f3035192eaa63f56867b88e63e4e5d # v1
env:
SEMGREP_EXCLUDE: api/docs
with:
config: p/security-audit

sca:
runs-on: ubuntu-24.04
timeout-minutes: 10
permissions:
contents: read

steps:
- name: Checkout code
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2

- name: Run Trivy vulnerability scanner in fs mode
uses: aquasecurity/trivy-action@ed142fd0673e97e23eac54620cfb913e5ce36c25 # v0.36.0
with:
scan-type: fs
scan-ref: .
scanners: vuln
severity: CRITICAL,HIGH
exit-code: '1'

php-check:
runs-on: ubuntu-24.04
timeout-minutes: 10
permissions:
contents: read

steps:
- name: Checkout code
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2

- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: "8.2"
coverage: none

- name: Validate Composer configuration
run: composer validate

- name: Install Composer dependencies
run: composer install --no-interaction --no-progress

- name: Check PHP syntax
run: php -v

# Disabled for now due to legacy PHP compatibility issues
# detected in existing project files. This check can be
# re-enabled once PHP 8 compatibility has been fully addressed.
#
# - name: Check PHP syntax
# run: |
# find . -type f -name "*.php" -print0 | xargs -0 -n1 php -l

generate-sbom:
runs-on: ubuntu-24.04
needs:
- gitleaks
- sast
- sca
- php-check
timeout-minutes: 10
permissions:
contents: write

steps:
- name: Checkout code
uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4.3.0

- name: Run Trivy in GitHub SBOM mode and submit results to Dependency Graph
uses: aquasecurity/trivy-action@ed142fd0673e97e23eac54620cfb913e5ce36c25 # v0.36.0
with:
scan-type: fs
format: github
output: dependency-results.sbom.json
scan-ref: .
8 changes: 8 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
#users should be creating this
db.inc.php
*.local.php
*.key
*.pem
*.crt
*.p12
.env
.env.*


#we don't want to accidentally send this out populated, again
install.log
Expand Down
3 changes: 3 additions & 0 deletions .semgrepignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
api/docs/swagger-ui.js
api/docs/swagger-ui-es-bundle-core.js
api/docs/swagger-ui-standalone-preset.js
Loading