Merge branch 'main' into dev #3424
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Quality and Security Checkers | |
on: | |
push: | |
branches: [ "master", "dev", "main" ] | |
pull_request: | |
branches: [ "master", "dev", "main", "feat/*", "fix/*" ] | |
workflow_dispatch: | |
permissions: | |
pull-requests: read # allows SonarCloud to decorate PRs with analysis results | |
jobs: | |
Quality: | |
runs-on: ubuntu-latest | |
environment: | |
name: QA | |
steps: | |
- uses: actions/checkout@v2 | |
with: | |
fetch-depth: 0 | |
- name: Analyze with SonarCloud | |
uses: SonarSource/sonarcloud-github-action@master | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} | |
with: | |
# Additional arguments for the sonarcloud scanner | |
args: | |
# Unique keys of your project and organization. You can find them in SonarCloud > Information (bottom-left menu) | |
# mandatory | |
-Dsonar.projectKey=ipti_br.tag | |
-Dsonar.organization=ipti | |
-Dsonar.scm.provider=git | |
-Dsonar.exclusions=themes/default/js/amcharts/**,app/migrations/** | |
-Dsonar.cpd.exclusions=themes/default/js/amcharts/**,app/migrations/** | |
# Comma-separated paths to directories containing main source files. | |
#-Dsonar.sources= # optional, default is project base directory | |
# When you need the analysis to take place in a directory other than the one from which it was launched | |
#-Dsonar.projectBaseDir= # optional, default is . | |
# Comma-separated paths to directories containing test source files. | |
#-Dsonar.tests= # optional. For more info about Code Coverage, please refer to https://docs.sonarcloud.io/enriching/test-coverage/overview/ | |
# Adds more detail to both client and server-side analysis logs, activating DEBUG mode for the scanner, and adding client-side environment variables and system properties to the server-side log of analysis report processing. | |
#-Dsonar.verbose= # optional, default is false | |
Security: | |
runs-on: ubuntu-latest | |
permissions: | |
# required for all workflows | |
security-events: write | |
environment: | |
name: QA | |
defaults: | |
run: | |
working-directory: ../../br.tag | |
steps: | |
- uses: actions/checkout@master | |
- name: Run Snyk to check for vulnerabilities (PHP) | |
uses: snyk/actions/php@master | |
continue-on-error: true | |
with: | |
command: code test | |
args: --workdir=br.tag --sarif-file-output=snyk.sarif --sarif | |
env: | |
SNYK_TOKEN: ${{ secrets.SNYK_TOKEN }} | |
- uses: github/codeql-action/upload-sarif@v2 | |
with: | |
sarif_file: snyk.sarif |