T08 · Insecure Dependencies
- Location
SKILL.md:189- Finding
Unpinned Gradle Build Plugin Allows Unreviewed Upstream Code Execution
- Content
View full analysis
Vulnerability Details
File Location:
SKILL.md:183-189, with automatic dependency retrieval atSKILL.md:257-267
Vulnerability Type: Dynamic build dependency version
Risk Level: HighVulnerable Code
groovy // File 2: Project-level build.gradle // Add to buildscript.dependencies classpath "com.mob.sdk:MobSDK2:+"The Skill subsequently instructs the Agent to execute:
bash cd {project_path} ./gradlew --refresh-dependenciesTechnical Analysis
The
+version selector instructs Gradle to resolve the latest available version of theMobSDK2build plugin rather than a specific reviewed release. Gradle plugins execute code during project configuration and compilation, so they operate as executable dependencies rather than passive libraries.Because the selected artifact can change after the Skill has been reviewed, future executions may retrieve different plugin code without any change to this repository. The explicit use of
--refresh-dependenciesincreases exposure by forcing Gradle to recheck remote repositories instead of consistently relying on previously cached artifacts.Exploitation requires control of, or a compromise affecting, the upstream repository, publication account, dependency metadata, or artifact-resolution process. No evidence shows that the currently referenced package is malicious; the vulnerability is the unsafe mutable dependency policy.
Attack Path
- An attacker compromises the plugin publisher, remote repository, release process, or relevant artifact metadata.
- The attacker publishes a malicious version matching
com.mob.sdk:MobSDK2:+. - The user authorizes the Skill to add the dynamic dependency to the Android project.
- The Skill runs
./gradlew --refresh-dependencies. - Gradle resolves and downloads the attacker-controlled release.
- The malicious plugin executes during Gradle configuration or build execution with the privileges ...[truncated 702 chars]
- Remediation
View remediation
Remediation Suggestions
- Replace the dynamic selector with an explicitly reviewed version:
groovy classpath "com.mob.sdk:MobSDK2:<audited-exact-version>" - Verify the selected version against the vendor's official release documentation before use.
- Enable Gradle dependency verification and commit trusted SHA-256 checksums in
gradle/verification-metadata.xml. - Use dependency locking where applicable and review all lockfile or verification-metadata changes.
- Avoid
--refresh-dependenciesby default. Explain the network and code-execution implications and request separate explicit confirmation before running Gradle. - Run builds in a restricted environment with minimum credentials and filesystem access, particularly in CI.
- Configure repository content filters so only expected MobTech group identifiers can be resolved from the vendor repository.
- Replace the dynamic selector with an explicitly reviewed version:
