Skip to content
Merged
Show file tree
Hide file tree
Changes from 3 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
4 changes: 2 additions & 2 deletions .github/workflows/maven-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -93,13 +93,13 @@ jobs:
fi
echo "Final version: $VERSION"
echo "VERSION=$VERSION" >> $GITHUB_ENV
mvn versions:set -DnewVersion=$VERSION --no-transfer-progress
./mvnw versions:set -DnewVersion=$VERSION --no-transfer-progress
env:
TZ: Asia/Shanghai

- name: Publish to Maven Central
run: |
mvn clean deploy -P release \
./mvnw clean deploy -P release \
-Dmaven.test.skip=true \
-Dgpg.args="--batch --yes --pinentry-mode loopback" \
--no-transfer-progress
Expand Down
3 changes: 3 additions & 0 deletions .mvn/wrapper/maven-wrapper.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
wrapperVersion=3.3.4
distributionType=only-script
distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.9.16/apache-maven-3.9.16-bin.zip

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge 为下载的 Maven 发行包配置校验和

当 Maven Wrapper 缓存未命中时,该 URL 对应的压缩包会被直接下载、解压并执行;由于未设置 distributionSha256Sum,新增脚本中的校验分支会被跳过。发布作业同时持有 Maven Central 凭据和已导入的 GPG 私钥,因此下载源或传输链路一旦返回被篡改的归档,就可能执行任意代码并窃取发布凭据或伪造制品;请在此处固定 Apache 官方公布的 SHA-256 值,使校验失败时终止发布。

AGENTS.md reference: AGENTS.md:L104-L106

Useful? React with 👍 / 👎.

Comment thread
Copilot marked this conversation as resolved.
295 changes: 295 additions & 0 deletions mvnw

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading