Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
77 changes: 26 additions & 51 deletions .github/workflows/CodeQLAdvanced.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,84 +17,59 @@ on:
pull_request:
branches: [ "dev", "main", "dependabot" ]
schedule:
- cron: '16 1 * * 5'
- cron: '16 1 * * 5' # 每周五凌晨1:16运行

jobs:
analyze:
name: Analyze (${{ matrix.language }})
# 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 (GitHub.com only)
# Consider using larger runners or machines with greater resources for possible analysis time improvements.
runs-on: ${{ (matrix.language == 'swift' && 'macos-latest') || 'ubuntu-latest' }}
permissions:
# required for all workflows
security-events: write

# required to fetch internal or private CodeQL packs
packages: read

# only required for workflows in private repositories
actions: read
contents: read

strategy:
fail-fast: false
matrix:
include:
- language: actions
build-mode: none
- language: java-kotlin
build-mode: none # This mode only analyzes Java. Set this to 'autobuild' or 'manual' to analyze Kotlin too.
# CodeQL supports the following values keywords for 'language': 'actions', 'c-cpp', 'csharp', 'go', 'java-kotlin', 'javascript-typescript', 'python', 'ruby', 'rust', 'swift'
# Use `c-cpp` to analyze code written in C, C++ or both
# Use 'java-kotlin' to analyze code written in Java, Kotlin or both
# Use 'javascript-typescript' to analyze code written in JavaScript, TypeScript or both
# To learn more about changing the languages that are analyzed or customizing the build mode for your analysis,
# see https://docs.github.com/en/code-security/code-scanning/creating-an-advanced-setup-for-code-scanning/customizing-your-advanced-setup-for-code-scanning.
# If you are analyzing a compiled language, you can modify the 'build-mode' for that language to customize how
# your codebase is analyzed, see https://docs.github.com/en/code-security/code-scanning/creating-an-advanced-setup-for-code-scanning/codeql-code-scanning-for-compiled-languages
- language: actions
build-mode: none
- language: java-kotlin
build-mode: autobuild # 改为 autobuild 以更好地处理 Kotlin 和 Java 编译:cite[1]

steps:
- name: Checkout repository
uses: actions/checkout@v4

# Add any setup steps before running the `github/codeql-action/init` action.
# This includes steps like installing compilers or runtimes (`actions/setup-node`
# or others). This is typically only required for manual builds.
# - name: Setup runtime (example)
# uses: actions/setup-example@v1

# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v3
uses: github/codeql-action/init@v3 # 更新到最新v3版本
with:
languages: ${{ matrix.language }}
build-mode: ${{ matrix.build-mode }}
# 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.
# 考虑添加自定义查询包或查询套件(如有需要)
# queries: security-and-quality, security-extended
# 或使用配置文件
# config-file: ./.github/codeql/codeql-config.yml

# 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: Setup Java (for Java/Kotlin analysis)
if: matrix.language == 'java-kotlin'
uses: actions/setup-java@v3
with:
distribution: 'temurin'
java-version: '11'

# If the analyze step fails for one of the languages you are analyzing with
# "We were unable to automatically build your code", modify the matrix above
# to set the build mode to "manual" for that language. Then modify this step
# to build your code.
# ℹ️ 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: matrix.build-mode == 'manual'
shell: bash
run: |
echo 'If you are using a "manual" build mode for one or more of the' \
'languages you are analyzing, replace this with the commands to build' \
'your code, for example:'
echo ' make bootstrap'
echo ' make release'
exit 1
- name: Build with Maven (for Java/Kotlin analysis)
if: matrix.language == 'java-kotlin' && matrix.build-mode == 'manual'
run: mvn clean compile -q

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v3
with:
# category 可用于区分不同分析任务的结果
category: "/language:${{matrix.language}}"
# 显示设置输出文件格式和名称(可选,但更清晰)
output: codeql-results-${{ matrix.language }}.sarif
# 如果希望发现安全问题时依然上传结果而非失败,可设置以下选项(可选)
# continue-on-error: true
51 changes: 51 additions & 0 deletions meta-bom/pom.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
<?xml version="1.0" encoding="UTF-8"?><project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>com.acanx.meta</groupId>
<artifactId>meta-open</artifactId>
<version>${revision}</version>
<relativePath>../pom.xml</relativePath>
</parent>
<groupId>com.acanx.meta</groupId>
<artifactId>meta-bom</artifactId>
<version>${revision}</version>
<packaging>pom</packaging>
<name>Meta-BOM</name>
<description>Meta-BOM POM</description>
<url>https://github.com/ACANX/MetaOpen</url>
<properties/>

<modules>
<module>bom-graalvm</module>
</modules>

<dependencies/>
<dependencyManagement>
<dependencies>
<dependency>
<groupId>com.acanx.meta</groupId>
<artifactId>os-dependencies</artifactId>
<version>${revision}</version>
<type>pom</type>
<scope>import</scope>
</dependency>
</dependencies>
</dependencyManagement>

<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>${maven-compiler-plugin.version}</version>
<configuration>
<compilerVersion>${java.version}</compilerVersion>
<source>${java.version}</source>
<target>${java.version}</target>
<encoding>${project.build.sourceEncoding}</encoding>
</configuration>
</plugin>
</plugins>
</build>

</project>
2 changes: 1 addition & 1 deletion meta-component/bom-graalvm/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

<groupId>com.acanx.meta.component</groupId>
<artifactId>bom-graalvm</artifactId>
<version>21.0.0.0-SNAPSHOT</version>
<version>21.0.0.1</version>
<packaging>pom</packaging>
<name>BOM-GraalVM</name>
<description>GraalVM Component BOM</description>
Expand Down
4 changes: 2 additions & 2 deletions meta-component/sdk-maven-artifact/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

<groupId>com.acanx.meta.component</groupId>
<artifactId>sdk-maven-artifact</artifactId>
<version>0.2.1</version>
<version>${revision}</version>
<packaging>jar</packaging>
<name>SDK-Maven-Artifact</name>
<description>Maven-Artifact SDK Module</description>
Expand All @@ -25,7 +25,7 @@
<dependency>
<groupId>com.acanx.meta.model</groupId>
<artifactId>model-maven</artifactId>
<version>0.3.9</version>
<version>${revision}</version>
</dependency>
<dependency>
<groupId>com.acanx.meta.model</groupId>
Expand Down
2 changes: 1 addition & 1 deletion meta-model/model-deepseek/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

<groupId>com.acanx.meta.model</groupId>
<artifactId>model-deepseek</artifactId>
<version>0.2.0-SNAPSHOT</version>
<version>${revision}</version>
<packaging>jar</packaging>
<name>Model-DeepSeek</name>
<description>DeepSeek Model Module</description>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.acanx.meta.model;
package com.acanx.meta.model.deepseek;


import org.junit.jupiter.api.Assertions;
Expand Down
2 changes: 1 addition & 1 deletion meta-model/model-dingtalk/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

<groupId>com.acanx.meta.model</groupId>
<artifactId>model-dingtalk</artifactId>
<version>0.2.0-SNAPSHOT</version>
<version>${revision}</version>
<packaging>jar</packaging>
<name>Model-Dingtalk</name>
<description>Dingtalk Model Module</description>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.acanx.meta.model;
package com.acanx.meta.model.dingtalk;


import org.junit.jupiter.api.Assertions;
Expand Down
2 changes: 1 addition & 1 deletion meta-model/model-maven/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

<groupId>com.acanx.meta.model</groupId>
<artifactId>model-maven</artifactId>
<version>0.1.0</version>
<version>${revision}</version>
<packaging>jar</packaging>
<name>model-maven</name>
<url>https://acanx.com</url>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.acanx.meta.model;
package com.acanx.meta.model.maven;


import org.junit.jupiter.api.Assertions;
Expand Down
2 changes: 1 addition & 1 deletion meta-model/model-quote/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

<groupId>com.acanx.meta.model</groupId>
<artifactId>model-quote</artifactId>
<version>0.1.6</version>
<version>${revision}</version>
<packaging>jar</packaging>
<name>Quote Model Module</name>
<url>https://github.com/ACANX/MetaOpen</url>
Expand Down
2 changes: 1 addition & 1 deletion meta-model/model-security/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

<groupId>com.acanx.meta.model</groupId>
<artifactId>model-security</artifactId>
<version>0.2.0-SNAPSHOT</version>
<version>${revision}</version>
<packaging>jar</packaging>
<name>Model-Security</name>
<description>Security Model Module</description>
Expand Down
2 changes: 1 addition & 1 deletion meta-model/model-sonatype/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

<groupId>com.acanx.meta.model</groupId>
<artifactId>model-sonatype</artifactId>
<version>0.2.0</version>
<version>${revision}</version>
<packaging>jar</packaging>
<name>SonaType Model Module</name>
<url>https://acanx.com</url>
Expand Down
2 changes: 1 addition & 1 deletion meta-model/model-test/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

<groupId>com.acanx.meta.model</groupId>
<artifactId>model-test</artifactId>
<version>0.2.0-SNAPSHOT</version>
<version>${revision}</version>
<packaging>jar</packaging>
<name>Model-Test</name>
<description>Meta Test Model Module</description>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.acanx.meta.model;
package com.acanx.meta.model.test;


import org.junit.jupiter.api.Assertions;
Expand Down
Loading
Loading