From 57a1210cb8e005042af959448cb888f19414b30a Mon Sep 17 00:00:00 2001 From: Daniel Fahlke Date: Mon, 3 Oct 2022 13:09:16 +0200 Subject: [PATCH 1/6] Create codeql-analysis.yml --- .github/workflows/codeql-analysis.yml | 77 +++++++++++++++++++++++++++ 1 file changed, 77 insertions(+) create mode 100644 .github/workflows/codeql-analysis.yml diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yml new file mode 100644 index 00000000000..49330495b98 --- /dev/null +++ b/.github/workflows/codeql-analysis.yml @@ -0,0 +1,77 @@ +# 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: [ "1.9.4.x", 20.0 ] + pull_request: + # The branches below must be a subset of the branches above + branches: [ "1.9.4.x", 20.0 ] + paths-ignore: + - '**/*.md' + - '**/*.txt' + schedule: + - cron: '33 4 * * 4' + +jobs: + analyze: + name: Analyze + runs-on: ubuntu-latest + permissions: + actions: read + contents: read + security-events: write + + strategy: + fail-fast: false + matrix: + language: [ 'javascript' ] + # CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python', 'ruby' ] + # 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. + + # 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#, or Java). + # If this step fails, then you should remove it and run the build manually (see below) + - name: Autobuild + uses: github/codeql-action/autobuild@v2 + + # â„šī¸ 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 + with: + category: "/language:${{matrix.language}}" From e044fe521d180bc25d10aa719df63d810b8072f0 Mon Sep 17 00:00:00 2001 From: Flyingmana Date: Fri, 30 Dec 2022 21:14:07 +0100 Subject: [PATCH 2/6] add files to ignore for codeql --- .github/workflows/codeql-analysis.yml | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yml index 49330495b98..fd3a3ef5be0 100644 --- a/.github/workflows/codeql-analysis.yml +++ b/.github/workflows/codeql-analysis.yml @@ -48,6 +48,13 @@ jobs: uses: github/codeql-action/init@v2 with: languages: ${{ matrix.language }} + paths-ignore: + - 'js/mage/adminhtml/wysiwyg/tiny_mce/setup.js' + - 'js/prototype/validation.js' + - 'js/tiny_mce/tiny_mce_jquery_src.js' + - 'js/tiny_mce/classes/**/*.js' + - 'js/tiny_mce/plugins/**/*.js' + - '**/*.test.js' # 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. From 29b3b2e6cdc550ea0aa68fe6da80794136553d7c Mon Sep 17 00:00:00 2001 From: Flyingmana Date: Fri, 30 Dec 2022 21:43:24 +0100 Subject: [PATCH 3/6] remove cron trigger --- .github/workflows/codeql-analysis.yml | 2 -- 1 file changed, 2 deletions(-) diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yml index fd3a3ef5be0..ff6bd3dd573 100644 --- a/.github/workflows/codeql-analysis.yml +++ b/.github/workflows/codeql-analysis.yml @@ -20,8 +20,6 @@ on: paths-ignore: - '**/*.md' - '**/*.txt' - schedule: - - cron: '33 4 * * 4' jobs: analyze: From 8e9e8c3930219b909b3a4487dcacabe8da2701c3 Mon Sep 17 00:00:00 2001 From: Flyingmana Date: Fri, 30 Dec 2022 21:55:18 +0100 Subject: [PATCH 4/6] move codeql ignore into config file --- .github/codeql-config.yml | 8 ++++++++ .github/workflows/codeql-analysis.yml | 8 +------- 2 files changed, 9 insertions(+), 7 deletions(-) create mode 100644 .github/codeql-config.yml diff --git a/.github/codeql-config.yml b/.github/codeql-config.yml new file mode 100644 index 00000000000..9e568b92664 --- /dev/null +++ b/.github/codeql-config.yml @@ -0,0 +1,8 @@ + +paths-ignore: + - 'js/mage/adminhtml/wysiwyg/tiny_mce/setup.js' + - 'js/prototype/validation.js' + - 'js/tiny_mce/tiny_mce_jquery_src.js' + - 'js/tiny_mce/classes/**/*.js' + - 'js/tiny_mce/plugins/**/*.js' + - '**/*.test.js' diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yml index ff6bd3dd573..75bc27f3bbc 100644 --- a/.github/workflows/codeql-analysis.yml +++ b/.github/workflows/codeql-analysis.yml @@ -46,13 +46,7 @@ jobs: uses: github/codeql-action/init@v2 with: languages: ${{ matrix.language }} - paths-ignore: - - 'js/mage/adminhtml/wysiwyg/tiny_mce/setup.js' - - 'js/prototype/validation.js' - - 'js/tiny_mce/tiny_mce_jquery_src.js' - - 'js/tiny_mce/classes/**/*.js' - - 'js/tiny_mce/plugins/**/*.js' - - '**/*.test.js' + config-file: ./.github/codeql-config.yml # 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. From c9d2f6c41c6c461f9bf837ed0f28e99028244714 Mon Sep 17 00:00:00 2001 From: Flyingmana Date: Fri, 30 Dec 2022 22:16:46 +0100 Subject: [PATCH 5/6] add more ignores to codeql --- .github/codeql-config.yml | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/.github/codeql-config.yml b/.github/codeql-config.yml index 9e568b92664..1e5782d016d 100644 --- a/.github/codeql-config.yml +++ b/.github/codeql-config.yml @@ -1,8 +1,18 @@ paths-ignore: + - 'js/prototype/prototype.js' + - 'skin/frontend/rwd/default/js/lib/selectivizr.js' + - 'js/mage/adminhtml/flexuploader.js' + - 'js/mage/adminhtml/sales/packaging.js' + - 'js/mage/adminhtml/uploader/instance.js' - 'js/mage/adminhtml/wysiwyg/tiny_mce/setup.js' - 'js/prototype/validation.js' + - 'js/tiny_mce/tiny_mce_src.js' - 'js/tiny_mce/tiny_mce_jquery_src.js' + - 'js/tiny_mce/tiny_mce_prototype_src.js' - 'js/tiny_mce/classes/**/*.js' + - 'js/tiny_mce/utils/**/*.js' - 'js/tiny_mce/plugins/**/*.js' + - 'js/lib/jquery/jquery-1.12.4.js' + - 'js/extjs/ext-tree.js' - '**/*.test.js' From 71da6e18743f74f5951835af09d8b588bf16986f Mon Sep 17 00:00:00 2001 From: Flyingmana Date: Fri, 30 Dec 2022 22:26:35 +0100 Subject: [PATCH 6/6] add more ignores to codeql config --- .github/codeql-config.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/codeql-config.yml b/.github/codeql-config.yml index 1e5782d016d..91051af581b 100644 --- a/.github/codeql-config.yml +++ b/.github/codeql-config.yml @@ -7,8 +7,12 @@ paths-ignore: - 'js/mage/adminhtml/uploader/instance.js' - 'js/mage/adminhtml/wysiwyg/tiny_mce/setup.js' - 'js/prototype/validation.js' + - 'js/tiny_mce/tiny_mce_dev.js' + - 'js/tiny_mce/tiny_mce.js' - 'js/tiny_mce/tiny_mce_src.js' + - 'js/tiny_mce/tiny_mce_jquery.js' - 'js/tiny_mce/tiny_mce_jquery_src.js' + - 'js/tiny_mce/tiny_mce_prototype.js' - 'js/tiny_mce/tiny_mce_prototype_src.js' - 'js/tiny_mce/classes/**/*.js' - 'js/tiny_mce/utils/**/*.js'