-
Notifications
You must be signed in to change notification settings - Fork 162
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
Testing #10
base: master
Are you sure you want to change the base?
Testing #10
Changes from all commits
9686f84
a01784e
6a57798
fa46571
462f577
2c818ac
0a82d5f
f12fddb
0c5ae8a
2fe98f7
225d604
39cbeac
b26464b
114ebe1
b2a38bd
c4797d1
15b63c5
68f1507
e00a960
309306e
616de32
2c8ba70
1925327
e26093f
1d5befb
6b5c01c
96e2995
50af738
1f2c587
bae3657
7b22a50
a628c0a
84b2a38
c32194d
ebe8566
220332f
68b9012
338ff3a
7a8fb81
d8a8c4b
44b6236
8ec7e88
04e920e
0641f23
871f1fe
2d7308c
f1e2165
efd7151
9dec52b
35f7f78
87a7351
bcbc34d
ec47e60
3c20be5
cb7623b
b8757ce
fbd627c
eb566b7
8523b6a
54f76b4
4958cc5
065bcef
577cb95
babe906
aeb1f6b
2718d31
1666ac6
43b5263
2b83f4f
a10a0f3
5393358
72e74c3
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,82 @@ | ||
# 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. | ||
# | ||
# ******** NOTE ******** | ||
# We have attempted to detect the languages in your repository. Please check | ||
# the `language` matrix defined below to confirm you have the correct set of | ||
# supported CodeQL languages. | ||
# | ||
name: "CodeQL" | ||
|
||
on: | ||
push: | ||
branches: [ "master" ] | ||
pull_request: | ||
# The branches below must be a subset of the branches above | ||
branches: [ "master" ] | ||
schedule: | ||
- cron: '31 2 * * 1' | ||
|
||
jobs: | ||
analyze: | ||
name: Analyze | ||
# Runner size impacts CodeQL analysis time. To learn more, please see: | ||
# - https://gh.io/recommended-hardware-resources-for-running-codeql | ||
# - https://gh.io/supported-runners-and-hardware-resources | ||
# - https://gh.io/using-larger-runners | ||
# Consider using larger runners for possible analysis time improvements. | ||
runs-on: ${{ (matrix.language == 'swift' && 'macos-latest') || 'ubuntu-latest' }} | ||
timeout-minutes: ${{ (matrix.language == 'swift' && 120) || 360 }} | ||
permissions: | ||
actions: read | ||
contents: read | ||
security-events: write | ||
|
||
strategy: | ||
fail-fast: false | ||
matrix: | ||
language: [ 'javascript' ] | ||
# CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python', 'ruby', 'swift' ] | ||
# 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: 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 }} | ||
# 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 | ||
|
||
|
||
# Autobuild attempts to build any compiled languages (C/C++, C#, Go, Java, or Swift). | ||
# If this step fails, then you should remove it and run the build manually (see below) | ||
- name: Autobuild | ||
uses: github/codeql-action/autobuild@v2 | ||
Check warning Code scanning / Semgrep Semgrep Finding: yaml.github-actions.security.third-party-action-not-pinned-to-commit-sha.third-party-action-not-pinned-to-commit-sha
An action sourced from a third-party repository on GitHub is not pinned to a full length commit SHA. Pinning an action to a full length commit SHA is currently the only way to use an action as an immutable release. Pinning to a particular SHA helps mitigate the risk of a bad actor adding a backdoor to the action's repository, as they would need to generate a SHA-1 collision for a valid Git object payload.
|
||
|
||
# ℹ️ Command-line programs to run using the OS shell. | ||
# 📚 See https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun | ||
|
||
# If the Autobuild fails above, remove it and uncomment the following three lines. | ||
# modify them (or add more) to build your code if your project, please refer to the EXAMPLE below for guidance. | ||
|
||
# - run: | | ||
# echo "Run, Build Application using script" | ||
# ./location_of_script_within_repo/buildscript.sh | ||
|
||
- name: Perform CodeQL Analysis | ||
uses: github/codeql-action/analyze@v2 | ||
Check warning Code scanning / Semgrep Semgrep Finding: yaml.github-actions.security.third-party-action-not-pinned-to-commit-sha.third-party-action-not-pinned-to-commit-sha
An action sourced from a third-party repository on GitHub is not pinned to a full length commit SHA. Pinning an action to a full length commit SHA is currently the only way to use an action as an immutable release. Pinning to a particular SHA helps mitigate the risk of a bad actor adding a backdoor to the action's repository, as they would need to generate a SHA-1 collision for a valid Git object payload.
|
||
with: | ||
category: "/language:${{matrix.language}}" |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,79 @@ | ||
# This workflow uses actions that are not certified by GitHub. | ||
# They are provided by a third-party and are governed by | ||
# separate terms of service, privacy policy, and support | ||
# documentation. | ||
|
||
# This workflow file requires a free account on Semgrep.dev to | ||
# manage rules, file ignores, notifications, and more. | ||
# | ||
# See https://semgrep.dev/docs | ||
|
||
name: Semgrep | ||
|
||
on: | ||
push: | ||
branches: [ "Testing-2" ] | ||
pull_request: | ||
# The branches below must be a subset of the branches above | ||
branches: [ "Testing-2" ] | ||
schedule: | ||
- cron: '44 18 * * 2' | ||
|
||
permissions: | ||
contents: read | ||
|
||
jobs: | ||
semgrep: | ||
permissions: | ||
contents: read # for actions/checkout to fetch code | ||
security-events: write # for github/codeql-action/upload-sarif to upload SARIF results | ||
actions: read # only required for a private repository by github/codeql-action/upload-sarif to get the Action run status | ||
name: Scan | ||
runs-on: ubuntu-latest | ||
container: | ||
image: returntocorp/semgrep | ||
steps: | ||
# Checkout project source | ||
- uses: actions/checkout@v3 | ||
- name: Semgrep Scan | ||
id: scan | ||
#run: semgrep ci --config=auto --suppress-errors --sarif || true | ||
run: | | ||
semgrep \ | ||
--sarif --output report.sarif \ | ||
--config=semgrep_rules.yaml | ||
|
||
# Scan code using project's configuration on https://semgrep.dev/manage | ||
# - uses: returntocorp/semgrep-action@fcd5ab7459e8d91cb1777481980d1b18b4fc6735 | ||
# with: | ||
#publishToken: ${{ secrets.SEMGREP_APP_TOKEN }} | ||
#publishDeployment: ${{ secrets.SEMGREP_DEPLOYMENT_ID }} | ||
# generateSarif: "1" | ||
|
||
# Upload SARIF file generated in previous step | ||
|
||
- name: Add Labels to Code Scanning Issues | ||
env: | ||
SEMGREP_SEVERITY: ${{ steps.scan.outputs.severity }} | ||
run: | | ||
if [[ "$SEMGREP_SEVERITY" == "error" ]]; then | ||
gh issue list | grep "Semgrep" | grep "error" | cut -d' ' -f1 | xargs -I {} gh issue add-label {} "High" | ||
elif [[ "$SEMGREP_SEVERITY" == "warning" ]]; then | ||
gh issue list | grep "Semgrep" | grep "warning" | cut -d' ' -f1 | xargs -I {} gh issue add-label {} "Medium" | ||
elif [[ "$SEMGREP_SEVERITY" == "info" ]]; then | ||
gh issue list | grep "Semgrep" | grep "info" | cut -d' ' -f1 | xargs -I {} gh issue add-label {} "Low" | ||
fi | ||
|
||
# Make sure you have the GitHub CLI (gh) available and configured in your workflow. | ||
|
||
# - name: Save Report as Pipeline Artifact | ||
# uses: actions/upload-artifact@v3 | ||
# with: | ||
# name: report.sarif | ||
# path: report.sarif | ||
|
||
# step 4 | ||
- name: Publish Code Scanning Alerts | ||
uses: github/codeql-action/upload-sarif@v2 | ||
Check warning Code scanning / Semgrep Semgrep Finding: yaml.github-actions.security.third-party-action-not-pinned-to-commit-sha.third-party-action-not-pinned-to-commit-sha
An action sourced from a third-party repository on GitHub is not pinned to a full length commit SHA. Pinning an action to a full length commit SHA is currently the only way to use an action as an immutable release. Pinning to a particular SHA helps mitigate the risk of a bad actor adding a backdoor to the action's repository, as they would need to generate a SHA-1 collision for a valid Git object payload.
|
||
with: | ||
sarif_file: report.sarif |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,66 @@ | ||
# This workflow uses actions that are not certified by GitHub. | ||
# They are provided by a third-party and are governed by | ||
# separate terms of service, privacy policy, and support | ||
# documentation. | ||
|
||
# This workflow helps you trigger a SonarQube analysis of your code and populates | ||
# GitHub Code Scanning alerts with the vulnerabilities found. | ||
# (this feature is available starting from SonarQube 9.7, Developer Edition and above) | ||
|
||
# 1. Make sure you add a valid GitHub configuration to your SonarQube (Administration > DevOps platforms > GitHub) | ||
|
||
# 2. Import your project on SonarQube | ||
# * Add your repository as a new project by clicking "Create project" from your homepage. | ||
# | ||
# 3. Select GitHub Actions as your CI and follow the tutorial | ||
# * a. Generate a new token and add it to your GitHub repository's secrets using the name SONAR_TOKEN | ||
# (On SonarQube, click on your avatar on top-right > My account > Security or ask your administrator) | ||
# | ||
# * b. Copy/paste your SonarQube host URL to your GitHub repository's secrets using the name SONAR_HOST_URL | ||
# | ||
# * c. Copy/paste the project Key into the args parameter below | ||
# (You'll find this information in SonarQube by following the tutorial or by clicking on Project Information at the top-right of your project's homepage) | ||
|
||
# Feel free to take a look at our documentation (https://docs.sonarqube.org/latest/analysis/github-integration/) | ||
# or reach out to our community forum if you need some help (https://community.sonarsource.com/c/sq/10) | ||
|
||
name: SonarQube analysis | ||
|
||
on: | ||
push: | ||
branches: [ "master" ] | ||
pull_request: | ||
branches: [ "master" ] | ||
workflow_dispatch: | ||
|
||
permissions: | ||
pull-requests: read # allows SonarQube to decorate PRs with analysis results | ||
|
||
jobs: | ||
Analysis: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Analyze with SonarQube | ||
|
||
# You can pin the exact commit or the version. | ||
uses: SonarSource/[email protected] | ||
Check warning Code scanning / Semgrep Semgrep Finding: yaml.github-actions.security.third-party-action-not-pinned-to-commit-sha.third-party-action-not-pinned-to-commit-sha
An action sourced from a third-party repository on GitHub is not pinned to a full length commit SHA. Pinning an action to a full length commit SHA is currently the only way to use an action as an immutable release. Pinning to a particular SHA helps mitigate the risk of a bad actor adding a backdoor to the action's repository, as they would need to generate a SHA-1 collision for a valid Git object payload.
|
||
#uses: SonarSource/sonarqube-scan-action@7295e71c9583053f5bf40e9d4068a0c974603ec8 | ||
Check failure Code scanning / Semgrep Semgrep Finding: generic.secrets.security.detected-sonarqube-docs-api-key.detected-sonarqube-docs-api-key
SonarQube Docs API Key detected
|
||
#env: | ||
# GITHUB_TOKEN: ${{ secrets.GT_TOKEN }} # Needed to get PR information | ||
# SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} # Generate a token on SonarQube, add it to the secrets of this repo with the name SONAR_TOKEN (Settings > Secrets > Actions > add new repository secret) | ||
# SONAR_HOST_URL: ${{ secrets.SONAR_HOST_URL }} # add the URL of your instance to the secrets of this repo with the name SONAR_HOST_URL (Settings > Secrets > Actions > add new repository secret) | ||
with: | ||
# Additional arguments for the sonarcloud scanner | ||
args: | ||
# Unique key of your project. You can find it in SonarQube > [my project] > Project Information (top-right menu) | ||
# mandatory | ||
-Dsonar.projectKey= | ||
# 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 |
Check warning
Code scanning / Semgrep
Semgrep Finding: yaml.github-actions.security.third-party-action-not-pinned-to-commit-sha.third-party-action-not-pinned-to-commit-sha