A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://github.com/github/codeql-cli-binaries/security/advisories/GHSA-gqh3-9prg-j95m below:

Environment variables written to debug logs · Advisory · github/codeql-cli-binaries · GitHub

Impact summary

CodeQL databases or logs produced by the CodeQL CLI may, in some circumstances, contain the environment variables from the time of database creation, including any secrets that were exposed as environment variables to the process. Users with access to these artifacts would be able to access these secrets.

For Kotlin, the complete environment is logged by default when the --keep-trap option is passed to the CodeQL CLI or CodeQL database creation fails to complete before finalization.

For Java, C/C++, and Swift, the complete environment is only logged when specific environment variables are set. These are not enabled by default or in debug mode on the CodeQL Action, and so impact is limited to advanced users manually enabling these options via the CLI.

This could be dangerous if you are storing secrets in environment variables and you are subsequently persisting the database or logs. In this case, you would be saving secrets to disk.

Impact details

The vulnerability only manifests under the following circumstances:

Kotlin

In CodeQL CLI versions >= 2.9.2 and <= 2.20.2, the CodeQL Kotlin extractor logs all environment variables into an intermediate file during the process of creating a CodeQL database for Kotlin code.

The intermediate file containing environment variables is deleted by default when finalizing the Kotlin database, so it is not included in a successfully created database.

However, a database that has not been finalized (for example, due to errors during database creation) will leave the intermediate files containing logged environment variables in the unfinalized database. Similarly, if the --keep-trap option is set during database creation, the intermediate files will not be deleted when the database is finalized.

Java C/C++ Swift Mitigations

Update to CodeQL CLI version 2.20.3 or later.

While using CodeQL CLI <= 2.20.2, avoid uploading, archiving, or saving unfinalized CodeQL databases from Kotlin analysis to persistent storage. These should be considered sensitive information and should be purged as soon as the CodeQL job, workflow, pipeline, or script is finished. If you have saved these unfinalized databases, rotate any secrets that were present in the environment when the databases were created.

Patches

This vulnerability will be fixed in CodeQL CLI version 2.20.3, in which database creation no longer logs the complete environment by default for any language.

References

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4