Vulnerabilities in pkg:golang/github.com/go-vela/sdk-go
PACKAGEGHSA-v8mx-hp2q-gw85 is a HIGH (CVSS 7.7) golang sdk for vela insecure vulnerability (General Security Weakness) affecting Github.com/go vela/sdk go libraries in the Go ecosystem. The issue involves golang sdk for vela insecure variable substitution. Remediation is available by upgrading affected packages to version 0.23.2.
pkg:golang/github.com/go-vela/sdk-go
Vulnerability advisories affecting package pkg:golang/github.com/go-vela/sdk-go. Select an advisory below to view technical details or fixes.
| Advisory ID | CVE / NVD | Severity | Summary |
|---|---|---|---|
| GHSA-v8mx-hp2q-gw85 | - | HIGH | Golang SDK for Vela Insecure Variable Substitution |
GHSA-v8mx-hp2q-gw85 at a Glance
Security Impact
CVSS: 7.7
The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:H/I:N/A:N).
How to Fix GHSA-v8mx-hp2q-gw85
To remediate this vulnerability, upgrade all affected Github.com/go vela/sdk go dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.
Upgrade github.com/go-vela/sdk-go to 0.23.2
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
inspect dependencies for github.com/go-vela/sdk-go
How to Check if You Are Affected
To determine whether your application is affected by GHSA-v8mx-hp2q-gw85, inspect your project dependencies for Github.com/go vela/sdk go:
inspect dependencies for github.com/go-vela/sdk-go
Analyze the terminal output to locate any version of Github.com/go vela/sdk go in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 0.23.2), your application is affected.
Note: Verify declared build manifests and deployed runtime container environments.
Technical Details
Vulnerability Mechanism & Technical Analysis
This vulnerability is classified under General Security Weakness. In Github.com/go vela/sdk go, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.
Source Advisory Statement
GHSA-v8mx-hp2q-gw85 Affected Github.com/go vela/sdk go Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
github.com/go-vela/sdk-go
|
Go |
< 0.23.2
|
0.23.2
|
References
Frequently Asked Questions
What is GHSA-v8mx-hp2q-gw85?
Which Github.com/go vela/sdk go versions are affected?
What version fixes GHSA-v8mx-hp2q-gw85?
Is github.com/go-vela/sdk-go affected?
What is the CVSS score of GHSA-v8mx-hp2q-gw85?
What CWE is associated with GHSA-v8mx-hp2q-gw85?
How can I check Go dependencies for GHSA-v8mx-hp2q-gw85?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-v8mx-hp2q-gw85",
"modified" : "2024-03-15T20:09:32Z",
"published" : "2024-03-15T20:09:32Z",
"aliases" : [ ],
"summary" : "Golang SDK for Vela Insecure Variable Substitution",
"details" : "### Impact\nVela pipelines can use variable substitution combined with insensitive fields like `parameters`, `image` and `entrypoint` to inject secrets into a plugin/image and — by using common substitution string manipulation — can bypass log masking and expose secrets without the use of the commands block. This unexpected behavior primarily impacts secrets restricted by the \"no commands\" option. This can lead to unintended use of the secret value, and increased risk of exposing the secret during image execution bypassing log masking.\n\nGiven by the following substitution examples:\nusing `parameters`\n```yaml\nsteps:\n - name: example\n image: <some plugin>\n secrets: [ example_secret ]\n parameters:\n example: $${EXAMPLE_SECRET}\n```\n\nusing `image` tag\n```yaml\nsteps:\n - name: example\n image: <some plugin>:latest${EXAMPLE_SECRET}\n secrets: [ example_secret ]\n```\n\nusing `entrypoint` as a shim for `commands`\n```yaml\nsteps:\n - name: example\n image: <some plugin>\n secrets: [ example_secret ]\n entrypoint:\n [\n \"sh\",\n \"-c\",\n \"echo $EXAMPLE_SECRET\",\n ]\n```\n\n\n\n**To exploit this** the pipeline author must be supplying the secrets to a plugin that is designed in such a way that will print those parameters in logs. Plugin parameters are not designed for sensitive values and are often intentionally printed throughout execution for informational/debugging purposes. Parameters should therefore be treated as insensitive.\n\nWhile Vela provides secrets masking, secrets exposure is not entirely solved by the masking process. A docker image (plugin) can easily expose secrets if they are not handled properly, or altered in some way. There is a responsibility on the end-user to understand how values injected into a plugin are used. This is a risk that exists for many CICD systems (like GitHub Actions) that handle sensitive runtime variables. Rather, the greater risk is that users who restrict a secret to the \"no commands\" option and use image restriction can still have their secret value exposed via substitution tinkering, which turns the image and command restrictions into a false sense of security.\n\n### Patches\nN/A\n\n### Workarounds\n- Do not provide sensitive values to plugins that can potentially expose them, especially in `parameters` that are not intended to be used for sensitive values.\n- Ensure plugins (especially those that utilize shared secrets) follow best practices to avoid logging parameters that are expected to be sensitive.\n- Minimize secrets with `pull_request` events enabled, as this allows users to change pipeline configurations and pull in secrets to steps not typically part of the CI process.\n- Make use of the build approval setting, restricting builds from untrusted users\n- Limit use of shared secrets, as they are less restrictive to access by nature.\n\n### References\n- https://github.com/go-vela/worker\n\n### For more information\n\nIf you have any questions or comments about this advisory:\n\n- Email us at [vela@target.com](mailto:vela@target.com)\n\nAffected products: `go-vela/worker`\n",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:H/I:N/A:N"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "Go",
"name" : "github.com/go-vela/sdk-go"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "0.23.2"
} ]
} ],
"database_specific" : {
"last_known_affected_version_range" : "<= 0.23.1"
}
} ],
"references" : [ {
"type" : "WEB",
"url" : "https://github.com/go-vela/sdk-go/security/advisories/GHSA-v8mx-hp2q-gw85"
}, {
"type" : "WEB",
"url" : "https://github.com/go-vela/sdk-go/commit/e3a34719badf37928e60f4402abe51f8b50055e1"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/go-vela/sdk-go"
} ],
"database_specific" : {
"cwe_ids" : [ ],
"severity" : "HIGH",
"github_reviewed" : true,
"github_reviewed_at" : "2024-03-15T20:09:32Z",
"nvd_published_at" : null
}
}