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

Sigspm 11700 add codeql #204

Closed
wants to merge 4 commits into from
Closed
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
54 changes: 0 additions & 54 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,6 @@ version: 2.1

orbs:
blackduck: signavio/[email protected]
fortify: signavio/[email protected]

executors:
fortify:
machine:
image: &ubuntu "ubuntu-2204:current"
resource_class: 2xlarge

references:
workspace_root: &workspace_root /home/circleci/repo
Expand Down Expand Up @@ -77,41 +70,6 @@ jobs:
blackduck-project-name: i18n
blackduck-project-path: *workspace_root

fortify-translate-and-scan:
executor: fortify
working_directory: *workspace_root
steps:
- checkout
- fortify/setup
- run:
name: Translate i18n
command: |
set -x
sourceanalyzer \
-b i18n \
-verbose \
./src
- run:
name: Analyze i18n
command: |
sourceanalyzer \
-b i18n \
-verbose \
-scan \
-f i18n.fpr
- store_artifacts:
path: i18n.fpr
- run:
name: 'Fortify: upload'
command: |
fortifyclient \
-url "$FORTIFY_SSC" \
-authtoken "$SSC_API_TOKEN" \
uploadFPR \
-file i18n.fpr \
-project signavio-i18n \
-version master

test:
<<: *container_config

Expand Down Expand Up @@ -194,15 +152,3 @@ workflows:
jobs:
- black-duck-scan:
context: BlackDuck

fortify-workflow:
triggers:
- schedule:
cron: '0 0 * * 0'
filters:
branches:
only: master
jobs:
- fortify-translate-and-scan:
context:
- fortify
56 changes: 56 additions & 0 deletions .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
name: 'CodeQL'

on:
push:
branches: ['master']
pull_request:
# The branches below must be a subset of the branches above
branches: ['master']
schedule:
- cron: '30 12 * * 5'

permissions:
actions: read
contents: read
security-events: write

jobs:
analyze:
name: Analyze
runs-on: 'ubuntu-latest'

strategy:
fail-fast: false
matrix:
language: ['javascript']

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

- name: Initialize CodeQL
uses: signavio/codeql-action/init@v2
with:
queries: security-extended
# run an 'alert-suppression' query
packs: 'codeql/${{ matrix.language }}-queries:AlertSuppression.ql'
languages: ${{ matrix.language }}

- name: auto-build
uses: signavio/codeql-action/autobuild@v2
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I assume the autobuild is not part of the signavio/codeql-action you would need to use another parent here.


- name: Perform CodeQL Analysis
id: analyze
uses: signavio/codeql-action/analyze@v2
with:
category: '/language:${{matrix.language}}'
output: sarif-results

- name: Dismiss alerts
if: github.ref == 'refs/heads/main'
uses: advanced-security/dismiss-alerts@v1
with:
sarif-id: ${{ steps.analyze.outputs.sarif-id }}
sarif-file: sarif-results/${{ matrix.language }}.sarif
env:
GITHUB_TOKEN: ${{ github.token }}
Loading