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
49 changes: 49 additions & 0 deletions .github/workflows/sonar.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
name: Sonar Scan

on:
push:
branches:
- main
- develop
- master
- 'release/**'
pull_request:

permissions:
contents: read

jobs:
sonar:
name: Sonar Scan
runs-on: ubuntu-latest

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

- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: '20'

- name: Install dependencies
run: npm ci

- name: Run tests with coverage
run: npm run test:coverage

- name: Sonar Scan
uses: SonarSource/sonarqube-scan-action@v6
env:
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
SONAR_HOST_URL: ${{ secrets.SONAR_HOST_URL }}
SONAR_ORGANIZATION: ${{ secrets.SONAR_ORGANIZATION }}

# - name: Sonar Quality Gate
# uses: SonarSource/sonarqube-quality-gate-action@v1.1.0
# timeout-minutes: 10
# env:
# SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
# SONAR_HOST_URL: ${{ secrets.SONAR_HOST_URL }}
32 changes: 32 additions & 0 deletions .github/workflows/trivy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: Security - Trivy

on:
push:
branches: [main, develop]
pull_request:

permissions:
contents: read
security-events: write

jobs:
trivy:
name: Trivy Scan
runs-on: ubuntu-latest

steps:
- name: Checkout
uses: actions/checkout@v4

- name: Run Trivy Scan
uses: aquasecurity/trivy-action@v0.35.0
with:
scan-type: fs
format: sarif
output: trivy-results.sarif
severity: CRITICAL,HIGH

- name: Upload results to GitHub Security
uses: github/codeql-action/upload-sarif@v3
with:
sarif_file: trivy-results.sarif
45 changes: 0 additions & 45 deletions Jenkinsfile

This file was deleted.

4 changes: 2 additions & 2 deletions sonar-project.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
sonar.projectKey=aptlogica_base-ui_6f26c5b2-1866-41a0-b97a-867b45ceecdb

sonar.projectKey=aptlogica_base-ui
sonar.organization=aptlogica
# Exclude test/support files, SDK, configs, and non-app sources from analysis
sonar.exclusions=**/*.test.ts,**/*.test.tsx,**/*.spec.ts,**/*.spec.tsx,**/__tests__/**,**/__test__/**,src/test/**,sdk/**,webpack.config.js,Dockerfile,**/*.stories.*,playwright.config.*,examples/**,src/types/**,src/**/types/**

Expand Down
Loading