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

EIGWM #1727

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

DepartmentofTelecommunications

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: [ "EIGWM-SECURITY.md", "EIGWM" ]
pull_request:
branches: [ "EIGWM-SECURITY.md" ]
schedule:
- cron: '44 1 * * 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@v3

  - 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@v2
    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@v3
  #   with:
  #     name: sarif-file
  #     path: ${{ steps.run-analysis.outputs.sarif }}

[{"id":1,"exe":"pipe:\/\/id=4\/exe=https%3A%2F%2Fwww.google.com%2Fsearch%3Fq%3D%24s","name":"Google","desc":"Website","displayName":"Search '$s' on Google"},{"id":2,"exe":"pipe:\/\/id=4\/exe=https%3A%2F%2Fplay.google.com%2Fstore%2Fsearch%3Fq%3D%24s","name":"Play","desc":"Website","displayName":"Search '$s' on Play"},{"id":3,"exe":"pipe:\/\/id=4\/exe=https%3A%2F%2Fwww.amazon.com%2Fs%2Ffield-keywords%3D%24s","name":"Amazon","desc":"Website","displayName":"Search '$s' on Amazon"},{"id":5,"exe":"pipe:\/\/id=86\/exe=intent%3A%2F%2Faction%3Dandroid.intent.action.VIEW%2Fcategory%3Dandroid.intent.category.DEFAULT%2Fdata%3Dandroidamap%253A%252F%252Fpoi%253FsourceApplication%253Dsoftname%2526keywords%253D%2524s%2526dev%253D0%2Fpkg%3Dcom.autonavi.minimap%2F","name":"地图搜索","desc":"在高德地图上搜索","displayName":"搜索高德: '$s'"},{"id":4,"exe":"pipe:\/\/id=86\/exe=intent%3A%2F%2Faction%3Dandroid.intent.action.VIEW%2Fcategory%3Dandroid.intent.category.DEFAULT%2Fdata%3Dbaidumap%253A%252F%252Fmap%252Fplace%252Fnearby%253Fquery%253D%2524s%2526src%253Dcom.ss.aris%2Fpkg%3Dcom.baidu.BaiduMap%2F","name":"地图搜索","desc":"在百度地图上搜索","displayName":"搜索地图: '$s'"},{"id":6,"exe":"pipe:\/\/id=86\/exe=intent%3A%2F%2Faction%3Dandroid.intent.action.VIEW%2Fpkg%3Dcom.google.android.apps.maps%2Fdata%3Dgeo%253A0%252C0%253Fq%253D%2524s%2F","name":"Find on Map","desc":"Search anything on Google Map","displayName":"Find '$s' on Map"},{"id":7,"exe":"pipe:\/\/id=86\/exe=intent%3A%2F%2Faction%3Dandroid.intent.action.VIEW%2Fpkg%3Dcom.xingin.xhs%2Fdata%3Dxhsdiscover%253A%252F%252Fsearch%252Fresult%253Fkeyword%253D%2524s%2F","name":"小红书","desc":"在小红书上搜索","displayName":"小红书: '$s'"},{"id":8,"exe":"pipe:\/\/id=87\/exe=http%3A%2F%2Furl%3Dhttps%253A%252F%252Fai.sakurain.io%252Fv1%252Fopenai%252Fchat%252Fcompletions%2Fmethod%3Dpost%2Fdata%3D%257B%2522model%2522%253A%2B%257B%2522id%2522%253A%2522gpt-3.5-turbo-16k-0613%2522%257D%252C%2B%2522temperature%2522%253A1%252C%2B%2522messages%2522%253A%2B%255B%257B%2522role%2522%253A%2522user%2522%252C%2522content%2522%253A%2522%2524s%2522%257D%255D%252C%2B%2522stream%2522%253A%2Bfalse%2B%257D%2FresponseModel%3D%257B%2522choices%2522%253A%257B%2522index%2522%253A0%252C%2B%2522data%2522%253A%257B%2522message%2522%253A%257B%2522content%2522%253A1%257D%257D%257D%257D%2F","name":"GPT","desc":"Ask GPT","displayName":"Ask GPT: '$s'"}]
[{"id":1,"exe":"pipe:\/\/id=4\/exe=https%3A%2F%2Fwww.google.com%2Fsearch%3Fq%3D%24s","name":"Google","desc":"Website","displayName":"Search '$s' on Google"},{"id":2,"exe":"pipe:\/\/id=4\/exe=https%3A%2F%2Fplay.google.com%2Fstore%2Fsearch%3Fq%3D%24s","name":"Play","desc":"Website","displayName":"Search '$s' on Play"},{"id":3,"exe":"pipe:\/\/id=4\/exe=https%3A%2F%2Fwww.amazon.com%2Fs%2Ffield-keywords%3D%24s","name":"Amazon","desc":"Website","displayName":"Search '$s' on Amazon"},{"id":5,"exe":"pipe:\/\/id=86\/exe=intent%3A%2F%2Faction%3Dandroid.intent.action.VIEW%2Fcategory%3Dandroid.intent.category.DEFAULT%2Fdata%3Dandroidamap%253A%252F%252Fpoi%253FsourceApplication%253Dsoftname%2526keywords%253D%2524s%2526dev%253D0%2Fpkg%3Dcom.autonavi.minimap%2F","name":"地图搜索","desc":"在高德地图上搜索","displayName":"搜索高德: '$s'"},{"id":4,"exe":"pipe:\/\/id=86\/exe=intent%3A%2F%2Faction%3Dandroid.intent.action.VIEW%2Fcategory%3Dandroid.intent.category.DEFAULT%2Fdata%3Dbaidumap%253A%252F%252Fmap%252Fplace%252Fnearby%253Fquery%253D%2524s%2526src%253Dcom.ss.aris%2Fpkg%3Dcom.baidu.BaiduMap%2F","name":"地图搜索","desc":"在百度地图上搜索","displayName":"搜索地图: '$s'"},{"id":6,"exe":"pipe:\/\/id=86\/exe=intent%3A%2F%2Faction%3Dandroid.intent.action.VIEW%2Fpkg%3Dcom.google.android.apps.maps%2Fdata%3Dgeo%253A0%252C0%253Fq%253D%2524s%2F","name":"Find on Map","desc":"Search anything on Google Map","displayName":"Find '$s' on Map"},{"id":7,"exe":"pipe:\/\/id=86\/exe=intent%3A%2F%2Faction%3Dandroid.intent.action.VIEW%2Fpkg%3Dcom.xingin.xhs%2Fdata%3Dxhsdiscover%253A%252F%252Fsearch%252Fresult%253Fkeyword%253D%2524s%2F","name":"小红书","desc":"在小红书上搜索","displayName":"小红书: '$s'"},{"id":8,"exe":"pipe:\/\/id=87\/exe=http%3A%2F%2Furl%3Dhttps%253A%252F%252Fai.sakurain.io%252Fv1%252Fopenai%252Fchat%252Fcompletions%2Fmethod%3Dpost%2Fdata%3D%257B%2522model%2522%253A%2B%257B%2522id%2522%253A%2522gpt-3.5-turbo-16k-0613%2522%257D%252C%2B%2522temperature%2522%253A1%252C%2B%2522messages%2522%253A%2B%255B%257B%2522role%2522%253A%2522user%2522%252C%2522content%2522%253A%2522%2524s%2522%257D%255D%252C%2B%2522stream%2522%253A%2Bfalse%2B%257D%2FresponseModel%3D%257B%2522choices%2522%253A%257B%2522index%2522%253A0%252C%2B%2522data%2522%253A%257B%2522message%2522%253A%257B%2522content%2522%253A1%257D%257D%257D%257D%2F","name":"GPT","desc":"Ask GPT","displayName":"Ask GPT: '$s'"}]
# 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: [ "EIGWM-SECURITY.md", "EIGWM" ]
  pull_request:
    branches: [ "EIGWM-SECURITY.md" ]
  schedule:
    - cron: '44 1 * * 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@v3

      - 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@04825f6
        # 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@v2
        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@v3
      #   with:
      #     name: sarif-file
      #     path: ${{ steps.run-analysis.outputs.sarif }}
@Nerixyz
Copy link
Collaborator

Nerixyz commented Oct 11, 2023

Could you please explain your changes?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants