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
54 changes: 54 additions & 0 deletions .github/workflows/cve-monitor-list-check.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
# Ensures dependency-cve-monitor.yml stays in sync when modules are removed.
name: "Dependency CVE Monitor Verification"

on:
pull_request:
merge_group:

permissions:
contents: read

jobs:
verify-exclusion-list:
name: Verify CVE monitor exclusion list
runs-on: ubuntu-latest
timeout-minutes: 2
steps:
- uses: actions/checkout@v6

- name: Validate -pl exclusion list against reactor modules
shell: bash
run: |
set -euo pipefail

WORKFLOW_FILE=".github/workflows/dependency-cve-monitor.yml"

# Extract the -pl argument from the workflow file
PL_LINE=$(grep -oP '(?<=-pl )\S+' "$WORKFLOW_FILE")
if [ -z "$PL_LINE" ]; then
echo "Could not find -pl argument in $WORKFLOW_FILE"
exit 1
fi

# Parse individual module exclusions (remove leading '!')
EXCLUDED_MODULES=$(echo "$PL_LINE" | tr ',' '\n' | sed 's/^!//')

# Collect all reactor modules from root pom.xml (recursive through submodule poms)
REACTOR_MODULES=$(grep -ohP '(?<=<module>)[^<]+' pom.xml)

HAS_ERRORS=0
while IFS= read -r MODULE; do
if ! echo "$REACTOR_MODULES" | grep -qx "$MODULE"; then
echo "::error::Module '$MODULE' is excluded in $WORKFLOW_FILE but does not exist in the Maven reactor (pom.xml)"
HAS_ERRORS=1
fi
done <<< "$EXCLUDED_MODULES"

if [ $HAS_ERRORS -eq 1 ]; then
echo ""
echo "The -pl exclusion list in $WORKFLOW_FILE references modules that are no longer in the reactor."
echo "Please remove the stale entries from the exclusion list."
exit 1
fi

echo "All excluded modules are valid reactor modules."
2 changes: 1 addition & 1 deletion .github/workflows/dependency-cve-monitor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ jobs:
maven-args: >-
-DtransitiveExcludes=*:*
-DclasspathScope=runtime
-pl !build-tools,!release-scripts,!archetypes,!test/test-utils,!test/sdk-benchmarks,!test/http-client-tests,!test/http-client-benchmarks,!test/s3-benchmarks,!test/protocol-tests-core,!test/ruleset-testing-core,!test/protocol-tests,!test/service-test-utils,!test/codegen-generated-classes-test,!test/sdk-standard-benchmarks,!test/module-path-tests,!test/tests-coverage-reporting,!test/stability-tests,!test/sdk-native-image-test,!test/auth-tests,!test/region-testing,!test/old-client-version-compatibility-test,!test/bundle-logging-bridge-binding-test,!test/v2-migration-tests,!test/bundle-shading-tests,!test/crt-unavailable-tests,!test/architecture-tests,!test/s3-tests
-pl !build-tools,!release-scripts,!archetypes,!test/test-utils,!test/sdk-benchmarks,!test/http-client-tests,!test/http-client-benchmarks,!test/s3-benchmarks,!test/protocol-tests-core,!test/ruleset-testing-core,!test/protocol-tests,!test/service-test-utils,!test/codegen-generated-classes-test,!test/sdk-standard-benchmarks,!test/module-path-tests,!test/tests-coverage-reporting,!test/stability-tests,!test/sdk-native-image-test,!test/auth-tests,!test/service-client-backward-compat-test,!test/bundle-logging-bridge-binding-test,!test/v2-migration-tests,!test/bundle-shading-tests,!test/crt-unavailable-tests,!test/architecture-tests,!test/s3-tests

@dagnir dagnir Aug 14, 2026

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

not blocking: seems like this same list occurs is multiple places. We should move it to a single central location (e.g. NON_PUBLISHED_MODULES or something) that can be updated once and all other build scripts can just reference it

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

It seems this exact list is only present here. We have a similar exclusion list generated by generate-modules-to-skip.sh for Maven and Docs, but that one dynamically derives it from ls test/, and also excludes (publishes) 5 test modules. This one can't easily do the same since it's a YAML input to a third-party GitHub Action.


notify-alerts:
if: github.repository == 'aws/aws-sdk-java-v2'
Expand Down
Loading