Skip to content

Bump the pip group across 1 directory with 4 updates #4

Bump the pip group across 1 directory with 4 updates

Bump the pip group across 1 directory with 4 updates #4

name: CodeQL_AIO_ContainerizedApp
on:
# push:
# branches: [ main ]
pull_request:
branches: [main]
jobs:
Container_Example01_JavaScript:
runs-on: "Ubuntu-latest"
permissions:
actions: read
contents: read
security-events: write
strategy:
fail-fast: false
matrix:
language: [javascript]
container:
image: node:18
options: --user root
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Set safe directory
run: |
git config --global --add safe.directory /__w/CodeQL_containerizedApp/CodeQL_containerizedApp/
# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v2
with:
languages:
${{ matrix.language }}
# If you wish to specify custom queries, you can do so here or in a config file.
# 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.
# For more 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: security-extended,security-and-quality
- name: NPM Installation
working-directory: /__w/CodeQL_containerizedApp/CodeQL_containerizedApp/Example01_JavaScript/
run: |
npm i -g typescript ts-node && \
npm install --omit=dev --unsafe-perm && \
npm dedupe && \
rm -rf frontend/node_modules && \
rm -rf frontend/.angular && \
rm -rf frontend/src/assets && \
mkdir logs && \
chown -R 65532 logs && \
chgrp -R 0 ftp/ frontend/dist/ logs/ data/ i18n/ && \
chmod -R g=u ftp/ frontend/dist/ logs/ data/ i18n/ && \
rm data/chatbot/botDefaultTrainingData.json || true && \
rm ftp/legal.md || true && \
rm i18n/*.json || true
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v2
Container_Example02_Java:
needs: Container_Example01_JavaScript
runs-on: "Ubuntu-latest"
permissions:
actions: read
contents: read
security-events: write
strategy:
fail-fast: false
matrix:
language: [Java]
container:
image: openjdk:8
options: --user root
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Set safe directory
run: |
git config --global --add safe.directory /__w/CodeQL_containerizedApp/CodeQL_containerizedApp/
- name: Install dependencies
working-directory: /__w/CodeQL_containerizedApp/CodeQL_containerizedApp/Example02_Java/
run: |
apt-get update && \
apt-get install build-essential maven default-jdk cowsay netcat -y && \
update-alternatives --config javac
- name: Initialize CodeQL
uses: github/codeql-action/init@v2
with:
languages: ${{ matrix.language }}
- name: Build with Maven
working-directory: /__w/CodeQL_containerizedApp/CodeQL_containerizedApp/Example02_Java/
run: |
mvn -B package --file pom.xml
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v2
Container_Example03_Csharp:
needs: [Container_Example01_JavaScript, Container_Example02_Java]
runs-on: "Ubuntu-latest"
permissions:
actions: read
contents: read
security-events: write
strategy:
fail-fast: false
matrix:
language: [csharp]
container:
image: mcr.microsoft.com/dotnet/aspnet:7.0
#options: --cpu 2
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Initialize CodeQL
uses: github/codeql-action/init@v2
with:
languages: ${{ matrix.language }}
- name: Install dependencies
run: |
apt-get update && apt-get upgrade -y --no-install-recommends && \
apt-get install -y wget && \
apt-get install -y curl
- name: Setup .NET
uses: actions/setup-dotnet@v3
with:
dotnet-version: 7.0.x
- name: Build with dotnet
working-directory: /__w/CodeQL_containerizedApp/CodeQL_containerizedApp/Example03_Csharp/WebGoatCore/
run: dotnet build WebGoatCore.csproj
# - name: Autobuild
# uses: github/codeql-action/autobuild@v2
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v2
Container_Example04_DockerBuild_and_Scan:
needs: [Container_Example01_JavaScript, Container_Example02_Java, Container_Example03_Csharp]
name: Analyze
runs-on: "Ubuntu-latest"
permissions:
actions: read
contents: read
security-events: write
strategy:
fail-fast: false
matrix:
language: [ 'python' ]
container:
image: jkafaty/codeql-dockerapp-example
options: --user root
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Fix permissions and Install Python3
run: |
chown root:root -R /github/home/ && \
chmod 777 -R /github/home/ && \
chown root:root -R /__w/_actions/github/codeql-action/ && \
chmod 777 -R /__w/_actions/github/codeql-action/ && \
apt-get update && apt-get install -y python3 python3-pip
- name: Initialize CodeQL
uses: github/codeql-action/init@v2
with:
languages: ${{ matrix.language }}
- name: Autobuild
uses: github/codeql-action/autobuild@v2
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v2