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

Create codeql.yml #2014

Draft
wants to merge 27 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
a6eda07
Create codeql.yml
pld Feb 6, 2023
e68ba8b
Update .github/workflows/codeql.yml
pld Mar 24, 2023
e35d60b
Merge branch 'main' into pld-add-codeql
pld Mar 24, 2023
53d7931
Update codeql.yml
pld Mar 24, 2023
e9ba63f
Update codeql.yml
pld Mar 24, 2023
32cf4d2
Update codeql.yml
pld Mar 24, 2023
0815e2b
Merge branch 'main' into pld-add-codeql
pld Mar 24, 2023
28240b4
Merge branch 'main' into pld-add-codeql
pld Mar 24, 2023
3769dde
Merge branch 'main' into pld-add-codeql
pld Mar 27, 2023
8e70fc7
replace cd with working dir
pld Mar 27, 2023
165f0fe
Run application script for app module
ellykits Mar 28, 2023
b704b82
Name workflow step
ellykits Mar 28, 2023
97c91c4
assemble release
pld Mar 29, 2023
e562976
Merge branch 'main' into pld-add-codeql
pld Mar 29, 2023
ca91f08
Merge branch 'main' into pld-add-codeql
ndegwamartin Apr 5, 2023
cb13fe9
Update Configuration Signed Release APK 🔧
ndegwamartin Apr 5, 2023
fce56f6
Merge branch 'main' into pld-add-codeql
ndegwamartin Apr 5, 2023
c253e6e
Merge branch 'main' into pld-add-codeql
ndegwamartin Apr 5, 2023
2daac32
missing bracket
pld Apr 5, 2023
c8d4b3f
Update codeQL config
ndegwamartin Apr 6, 2023
e61ecf8
Specify Release Build Variant
ndegwamartin Apr 6, 2023
c9a0573
Update codeql.yml
ndegwamartin Apr 6, 2023
d62e94b
Merge branch 'main' into pld-add-codeql
pld Apr 8, 2023
461d2ea
specify code-scanning explicitly
pld Apr 11, 2023
057cc81
Merge branch 'main' into pld-add-codeql
pld Apr 12, 2023
58fe27f
Merge branch 'main' into pld-add-codeql
pld Jul 17, 2023
d6babe7
Merge branch 'main' into pld-add-codeql
pld Jun 21, 2024
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
12 changes: 12 additions & 0 deletions .github/codeql/codeql-config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
name: "OpenSRP config"

disable-default-queries: true

packs:
- codeql/java-queries
query-filters:
- exclude:
problem.severity:
- error
- warning
- recommendation
75 changes: 75 additions & 0 deletions .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
# For most projects, this workflow file will not need changing; you simply need
# to commit it to your repository.
#
# You may wish to alter this file to override the set of languages analyzed,
# or to provide custom queries or build logic.
name: "CodeQL"

on:
push:
branches: [ 'main', 'mwcore-dev' ]
pull_request:
# The branches below must be a subset of the branches above
branches: [ 'main' ]
schedule:
- cron: '40 5 * * 6'

jobs:
analyze:
name: Analyze
runs-on: ubuntu-latest
permissions:
actions: read
contents: read
security-events: write

strategy:
fail-fast: false
matrix:
language: [ 'java' ]
# CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python', 'ruby' ]
# Use only 'java' to analyze code written in Java, Kotlin or both
# Use only 'javascript' to analyze code written in JavaScript, TypeScript or both
# Learn more about CodeQL language support at https://aka.ms/codeql-docs/language-support

steps:

- name: Decode & Generate Keystore file
run: echo $ENCODED_KEYSTORE | base64 -di > "${HOME}"/fhircore.keystore.jks
env:
ENCODED_KEYSTORE: ${{ secrets.KEYSTORE_FILE }}

- name: Checkout repository
uses: actions/checkout@v3

# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v2
with:
languages: ${{ matrix.language }}
# By default, queries listed here will override any specified in a config file.
# Prefix the list here with "+" to use these queries and those in the config file.
# Details on CodeQL's query packs refer to: https://docs.github.com/en/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/configuring-code-scanning#using-queries-in-ql-packs
# queries: code-scanning
config-file: ./.github/codeql/codeql-config.yml

- name: Decode & Generate local.properties file
run: echo $LOCAL_PROPERTIES | base64 -di > local.properties
working-directory: android
env:
LOCAL_PROPERTIES: ${{ secrets.LOCAL_PROPERTIES }}

- name: Decode & Generate keystore.properties file
run: echo $KEYSTORE_PROPERTIES | base64 -di > keystore.properties
working-directory: android
env:
KEYSTORE_PROPERTIES: ${{ secrets.KEYSTORE_PROPERTIES }}

- name: Build application using script
run: ./gradlew :quest:assembleQuestRelease
working-directory: android

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v2
with:
category: "/language:${{matrix.language}}"
Loading