-
Notifications
You must be signed in to change notification settings - Fork 0
Create codescan.yml #19
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
Changes from 14 commits
889c609
3769ea5
ca2ddef
cbd5616
02185fa
34a38ee
82ae69b
1d92ef4
822b150
d56ecdb
eb835d5
87e4127
f421b91
94a055a
fba5991
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,49 @@ | ||
| # 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 requires that you have an existing account with codescan.io | ||
| # For more information about configuring your workflow, | ||
| # read our documentation at https://github.com/codescan-io/codescan-scanner-action | ||
| name: CodeScan | ||
|
|
||
| on: | ||
| push: | ||
| branches: [ "main" ] | ||
| pull_request: | ||
| # The branches below must be a subset of the branches above | ||
| branches: [ "main" ] | ||
| schedule: | ||
| - cron: '19 13 * * 6' | ||
|
|
||
| permissions: | ||
| contents: read | ||
|
|
||
| jobs: | ||
| CodeScan: | ||
| 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 | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - name: Checkout repository | ||
| uses: actions/checkout@v4 | ||
| - name: Cache files | ||
| uses: actions/cache@v3 | ||
| with: | ||
| path: | | ||
| ~/.sonar | ||
| key: ${{ runner.os }}-sonar | ||
| restore-keys: ${{ runner.os }}-sonar | ||
| - name: Run Analysis | ||
| uses: codescan-io/codescan-scanner-action@5b2e8c5683ef6a5adc8fa3b7950bb07debccce12 | ||
| with: | ||
| login: ${{ secrets.CODESCAN_AUTH_TOKEN }} | ||
| organization: ${{ secrets.CODESCAN_ORGANIZATION_KEY }} | ||
| projectKey: ${{ secrets.CODESCAN_PROJECT_KEY }} | ||
| - name: Upload SARIF file | ||
| uses: github/codeql-action/upload-sarif@v3 | ||
| with: | ||
| sarif_file: codescan.sarif |
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| @@ -0,0 +1,53 @@ | ||||||||||||||||||||||||||||||||||||||||
| # 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. | ||||||||||||||||||||||||||||||||||||||||
| # ESLint is a tool for identifying and reporting on patterns | ||||||||||||||||||||||||||||||||||||||||
| # found in ECMAScript/JavaScript code. | ||||||||||||||||||||||||||||||||||||||||
| # More details at https://github.com/eslint/eslint | ||||||||||||||||||||||||||||||||||||||||
| # and https://eslint.org | ||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||
| name: ESLint | ||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||
| on: | ||||||||||||||||||||||||||||||||||||||||
| push: | ||||||||||||||||||||||||||||||||||||||||
| branches: [ "main" ] | ||||||||||||||||||||||||||||||||||||||||
| pull_request: | ||||||||||||||||||||||||||||||||||||||||
| # The branches below must be a subset of the branches above | ||||||||||||||||||||||||||||||||||||||||
| branches: [ "main" ] | ||||||||||||||||||||||||||||||||||||||||
| schedule: | ||||||||||||||||||||||||||||||||||||||||
| - cron: '35 21 * * 5' | ||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||
| jobs: | ||||||||||||||||||||||||||||||||||||||||
| eslint: | ||||||||||||||||||||||||||||||||||||||||
| name: Run eslint scanning | ||||||||||||||||||||||||||||||||||||||||
| runs-on: ubuntu-latest | ||||||||||||||||||||||||||||||||||||||||
| permissions: | ||||||||||||||||||||||||||||||||||||||||
| contents: read | ||||||||||||||||||||||||||||||||||||||||
| security-events: write | ||||||||||||||||||||||||||||||||||||||||
| actions: read # only required for a private repository by github/codeql-action/upload-sarif to get the Action run status | ||||||||||||||||||||||||||||||||||||||||
| steps: | ||||||||||||||||||||||||||||||||||||||||
| - name: Checkout code | ||||||||||||||||||||||||||||||||||||||||
| uses: actions/checkout@v4 | ||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||
| - name: Install ESLint | ||||||||||||||||||||||||||||||||||||||||
| run: | | ||||||||||||||||||||||||||||||||||||||||
| npm install eslint@8.10.0 | ||||||||||||||||||||||||||||||||||||||||
| npm install @microsoft/eslint-formatter-sarif@3.1.0 | ||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||
| - name: Run ESLint | ||||||||||||||||||||||||||||||||||||||||
| env: | ||||||||||||||||||||||||||||||||||||||||
| SARIF_ESLINT_IGNORE_SUPPRESSED: "true" | ||||||||||||||||||||||||||||||||||||||||
| run: | | ||||||||||||||||||||||||||||||||||||||||
| npx eslint . \ | ||||||||||||||||||||||||||||||||||||||||
| --config .eslintrc.js \ | ||||||||||||||||||||||||||||||||||||||||
| --ext .js,.jsx,.ts,.tsx \ | ||||||||||||||||||||||||||||||||||||||||
| --format @microsoft/eslint-formatter-sarif \ | ||||||||||||||||||||||||||||||||||||||||
| --output-file eslint-results.sarif | ||||||||||||||||||||||||||||||||||||||||
| continue-on-error: true | ||||||||||||||||||||||||||||||||||||||||
|
Comment on lines
+39
to
+47
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Fix YAML indentation for the The @@ .github/workflows/eslint.yml
- - name: Run ESLint
- env:
- SARIF_ESLINT_IGNORE_SUPPRESSED: "true"
- run: |
- npx eslint . \
- --config .eslintrc.js \
- --ext .js,.jsx,.ts,.tsx \
- --format @microsoft/eslint-formatter-sarif \
- --output-file eslint-results.sarif
- continue-on-error: true
+ - name: Run ESLint
+ env:
+ SARIF_ESLINT_IGNORE_SUPPRESSED: "true"
+ run: |
+ npx eslint . \
+ --config .eslintrc.js \
+ --ext .js,.jsx,.ts,.tsx \
+ --format @microsoft/eslint-formatter-sarif \
+ --output-file eslint-results.sarif
+ continue-on-error: true📝 Committable suggestion
Suggested change
🧰 Tools🪛 YAMLlint (1.35.1)[error] 41-41: syntax error: expected , but found '' (syntax) [warning] 47-47: wrong indentation: expected 7 but found 8 (indentation) |
||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||
| - name: Upload analysis results to GitHub | ||||||||||||||||||||||||||||||||||||||||
| uses: github/codeql-action/upload-sarif@v3 | ||||||||||||||||||||||||||||||||||||||||
| with: | ||||||||||||||||||||||||||||||||||||||||
| sarif_file: eslint-results.sarif | ||||||||||||||||||||||||||||||||||||||||
| wait-for-processing: true | ||||||||||||||||||||||||||||||||||||||||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,55 @@ | ||
| # 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. | ||
| # lintr provides static code analysis for R. | ||
| # It checks for adherence to a given style, | ||
| # identifying syntax errors and possible semantic issues, | ||
| # then reports them to you so you can take action. | ||
| # More details at https://lintr.r-lib.org/ | ||
|
|
||
| name: lintr | ||
|
|
||
| on: | ||
| push: | ||
| branches: [ "main" ] | ||
| pull_request: | ||
| # The branches below must be a subset of the branches above | ||
| branches: [ "main" ] | ||
| schedule: | ||
| - cron: '31 13 * * 4' | ||
|
|
||
| permissions: | ||
| contents: read | ||
|
|
||
| jobs: | ||
| lintr: | ||
| name: Run lintr scanning | ||
| runs-on: ubuntu-latest | ||
| permissions: | ||
| contents: read # for 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 | ||
|
|
||
| steps: | ||
| - name: Checkout code | ||
| uses: actions/checkout@v4 | ||
|
|
||
| - name: Setup R | ||
| uses: r-lib/actions/setup-r@4e1feaf90520ec1215d1882fdddfe3411c08e492 | ||
|
|
||
| - name: Setup lintr | ||
| uses: r-lib/actions/setup-r-dependencies@4e1feaf90520ec1215d1882fdddfe3411c08e492 | ||
| with: | ||
| extra-packages: lintr | ||
|
|
||
| - name: Run lintr | ||
| run: lintr::sarif_output(lintr::lint_dir("."), "lintr-results.sarif") | ||
| shell: Rscript {0} | ||
| continue-on-error: true | ||
|
|
||
| - name: Upload analysis results to GitHub | ||
| uses: github/codeql-action/upload-sarif@v3 | ||
| with: | ||
| sarif_file: lintr-results.sarif | ||
| wait-for-processing: true |
| 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. | ||
| # | ||
| # Find more information at: | ||
| # https://github.com/microsoft/msvc-code-analysis-action | ||
|
|
||
| name: Microsoft C++ Code Analysis | ||
|
|
||
| on: | ||
| push: | ||
| branches: [ "main" ] | ||
| pull_request: | ||
| branches: [ "main" ] | ||
| schedule: | ||
| - cron: '39 16 * * 2' | ||
|
|
||
| env: | ||
| # Path to the CMake build directory. | ||
| build: '${{ github.workspace }}/build' | ||
|
|
||
| permissions: | ||
| contents: read | ||
|
|
||
| jobs: | ||
| analyze: | ||
| 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: Analyze | ||
| runs-on: windows-latest | ||
|
|
||
| steps: | ||
| - name: Checkout repository | ||
| uses: actions/checkout@v4 | ||
|
|
||
| - name: Configure CMake | ||
| run: cmake -B ${{ env.build }} | ||
|
|
||
| # Build is not required unless generated source files are used | ||
| # - name: Build CMake | ||
| # run: cmake --build ${{ env.build }} | ||
|
|
||
| - name: Initialize MSVC Code Analysis | ||
| uses: microsoft/msvc-code-analysis-action@04825f6d9e00f87422d6bf04e1a38b1f3ed60d99 | ||
| # Provide a unique ID to access the sarif output path | ||
| id: run-analysis | ||
| with: | ||
| cmakeBuildDirectory: ${{ env.build }} | ||
| # Ruleset file that will determine what checks will be run | ||
| ruleset: NativeRecommendedRules.ruleset | ||
|
|
||
| # Upload SARIF file to GitHub Code Scanning Alerts | ||
| - name: Upload SARIF to GitHub | ||
| uses: github/codeql-action/upload-sarif@v3 | ||
| with: | ||
| sarif_file: ${{ steps.run-analysis.outputs.sarif }} | ||
|
|
||
| # Upload SARIF file as an Artifact to download and view | ||
| # - name: Upload SARIF as an Artifact | ||
| # uses: actions/upload-artifact@v4 | ||
| # with: | ||
| # name: sarif-file | ||
| # path: ${{ steps.run-analysis.outputs.sarif }} |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,57 @@ | ||
| # 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. | ||
| # PHPMD is a spin-off project of PHP Depend and | ||
| # aims to be a PHP equivalent of the well known Java tool PMD. | ||
| # What PHPMD does is: It takes a given PHP source code base | ||
| # and look for several potential problems within that source. | ||
| # These problems can be things like: | ||
| # Possible bugs | ||
| # Suboptimal code | ||
| # Overcomplicated expressions | ||
| # Unused parameters, methods, properties | ||
| # More details at https://phpmd.org/ | ||
|
|
||
| name: PHPMD | ||
|
|
||
| on: | ||
| push: | ||
| branches: [ "main" ] | ||
| pull_request: | ||
| # The branches below must be a subset of the branches above | ||
| branches: [ "main" ] | ||
| schedule: | ||
| - cron: '17 11 * * 4' | ||
|
|
||
| permissions: | ||
| contents: read | ||
|
|
||
| jobs: | ||
| PHPMD: | ||
| name: Run PHPMD scanning | ||
| runs-on: ubuntu-latest | ||
| permissions: | ||
| contents: read # for 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 | ||
|
|
||
| steps: | ||
| - name: Checkout code | ||
| uses: actions/checkout@v4 | ||
|
|
||
| - name: Setup PHP | ||
| uses: shivammathur/setup-php@aa1fe473f9c687b6fb896056d771232c0bc41161 | ||
| with: | ||
| coverage: none | ||
| tools: phpmd | ||
|
|
||
| - name: Run PHPMD | ||
| run: phpmd . sarif codesize --reportfile phpmd-results.sarif | ||
| continue-on-error: true | ||
|
|
||
| - name: Upload analysis results to GitHub | ||
| uses: github/codeql-action/upload-sarif@v3 | ||
| with: | ||
| sarif_file: phpmd-results.sarif | ||
| wait-for-processing: true |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,49 @@ | ||
| # 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. | ||
| # | ||
| # https://github.com/microsoft/action-psscriptanalyzer | ||
| # For more information on PSScriptAnalyzer in general, see | ||
| # https://github.com/PowerShell/PSScriptAnalyzer | ||
|
|
||
| name: PSScriptAnalyzer | ||
|
|
||
| on: | ||
| push: | ||
| branches: [ "main" ] | ||
| pull_request: | ||
| branches: [ "main" ] | ||
| schedule: | ||
| - cron: '24 20 * * 5' | ||
|
|
||
| permissions: | ||
| contents: read | ||
|
|
||
| jobs: | ||
| build: | ||
| 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: PSScriptAnalyzer | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - uses: actions/checkout@v4 | ||
|
|
||
| - name: Run PSScriptAnalyzer | ||
| uses: microsoft/psscriptanalyzer-action@6b2948b1944407914a58661c49941824d149734f | ||
| with: | ||
| # Check https://github.com/microsoft/action-psscriptanalyzer for more info about the options. | ||
| # The below set up runs PSScriptAnalyzer to your entire repository and runs some basic security rules. | ||
| path: . | ||
| recurse: true | ||
| # Include your own basic security rules. Removing this option will run all the rules | ||
| includeRule: 'PSAvoidGlobalAliases,PSAvoidUsingConvertToSecureStringWithPlainText' | ||
| output: results.sarif | ||
|
coderabbitai[bot] marked this conversation as resolved.
|
||
|
|
||
| # Upload the SARIF file generated in the previous step | ||
| - name: Upload SARIF results file | ||
| uses: github/codeql-action/upload-sarif@v3 | ||
| with: | ||
| sarif_file: results.sarif | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,55 @@ | ||
| # 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. | ||
| # Puppet Lint tests Puppet code against the recommended Puppet language style guide. | ||
| # https://puppet.com/docs/puppet/7/style_guide.html | ||
| # Puppet Lint validates only code style; it does not validate syntax. | ||
| # To test syntax, use Puppet's puppet parser validate command. | ||
| # More details at https://github.com/puppetlabs/puppet-lint/ | ||
|
|
||
| name: puppet-lint | ||
|
|
||
| on: | ||
| push: | ||
| branches: [ "main" ] | ||
| pull_request: | ||
| # The branches below must be a subset of the branches above | ||
| branches: [ "main" ] | ||
| schedule: | ||
| - cron: '41 13 * * 1' | ||
|
|
||
| permissions: | ||
| contents: read | ||
|
|
||
| jobs: | ||
| puppet-lint: | ||
| name: Run puppet-lint scanning | ||
| runs-on: ubuntu-latest | ||
| permissions: | ||
| contents: read # for 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 | ||
|
|
||
| steps: | ||
| - name: Checkout code | ||
| uses: actions/checkout@v4 | ||
|
|
||
| - name: Setup Ruby | ||
| uses: ruby/setup-ruby@55283cc23133118229fd3f97f9336ee23a179fcf # v1.146.0 | ||
| with: | ||
| ruby-version: 2.7 | ||
| bundler-cache: true | ||
|
|
||
| - name: Install puppet-lint | ||
| run: gem install puppet-lint | ||
|
|
||
| - name: Run puppet-lint | ||
| run: puppet-lint . --sarif > puppet-lint-results.sarif | ||
| continue-on-error: true | ||
|
|
||
| - name: Upload analysis results to GitHub | ||
| uses: github/codeql-action/upload-sarif@v3 | ||
| with: | ||
| sarif_file: puppet-lint-results.sarif | ||
| wait-for-processing: true |
Uh oh!
There was an error while loading. Please reload this page.