Scan report
replicatedhq / kots
Could an attacker exploit mistakes in this code?
Strong warning signs. Do not run or install this without a careful review.
- High
- 41
- Medium
- 598
- Low
- 21
Sources: Bandit, Semgrep, pip-audit
Does this code look like it is trying to cause harm?
Serious issues. Review the high-severity findings before using it.
- High
- 24
- Medium
- 1
- Low
- 7
Sources: YARA, ClamAV, GuardDog, dependency checker
- Likely real
- 583
- Uncertain
- 53
- Likely noise
- 56
The risk classifier rates every finding for how likely it is to be a real issue. Likely noise still counts, just much less.
What we found, in plain English
This repository shows serious security issues that could be exploited by attackers, but most of the problems are caused by standard insecure coding practices rather than intentional malicious behavior. The code contains dangerous patterns like executing commands from user-controlled inputs and decoding base64 data to run it, which creates a high risk for command injection and remote code execution vulnerabilities. While some findings suggest the code might be trying to hide its true purpose or bypass security checks, the majority of alerts point to common mistakes developers make when handling file paths, secrets, and external commands. The scan also found several workflow files that leak sensitive information by passing all secrets directly to other automated jobs, which is a significant privacy risk for anyone using this code in production environments.
Written by a local language model from the findings below. The risk scores come from the classifier, not from this summary.
Detections by engine
Score over time
Overall score each time this repository was scanned.
Findings
Highest severity first. Select a finding to see the code and what it means.
Large result: showing the top 232 of 692 findings (up to 200 per engine, most severe and most likely real first). Totals above include everything.
-
- Engine
- Semgrep · Pattern-based code analysis
- Counts towards
- Vulnerability
- File
- /e2e/playwright/shared-core/support-bundle.ts line 210
- Likely real
- Yes, 99% confidence
Detected calls to child_process from a function argument `page`. This could lead to a command injection if the input is user controllable. Try to avoid calls to child_process, and if it is needed ensure user input is correctly sanitized or sandboxed.
execSync(loginResponseHeadersCmd) -
- Engine
- Semgrep · Pattern-based code analysis
- Counts towards
- Vulnerability
- File
- /e2e/playwright/regression/shared/cli.ts line 575
- Likely real
- Yes, 99% confidence
Detected calls to child_process from a function argument `remoteUrl`. This could lead to a command injection if the input is user controllable. Try to avoid calls to child_process, and if it is needed ensure user input is correctly sanitized or sandboxed.
execSync(command, {stdio: 'inherit'}); -
- Engine
- Semgrep · Pattern-based code analysis
- Counts towards
- Vulnerability
- File
- /e2e/playwright/regression/shared/cli.ts line 575
- Likely real
- Yes, 99% confidence
Detected calls to child_process from a function argument `localPath`. This could lead to a command injection if the input is user controllable. Try to avoid calls to child_process, and if it is needed ensure user input is correctly sanitized or sandboxed.
execSync(command, {stdio: 'inherit'}); -
- Engine
- Semgrep · Pattern-based code analysis
- Counts towards
- Vulnerability
- File
- /pkg/handlers/update.go line 91
- Likely real
- Yes, 99% confidence
Untrusted input could be used to tamper with a web page rendering, which can lead to a Cross-site scripting (XSS) vulnerability. XSS vulnerabilities occur when untrusted input executes malicious JavaScript code, leading to issues such as account compromise and sensitive information leakage. To prevent this vulnerability, validate the user input, perform contextual output encoding or sanitize the input. For more information, see: [Go XSS prevention] (https://semgrep.dev/docs/cheat-sheets/go-xss/).
w.Write([]byte(cause.Error())) -
- Engine
- Semgrep · Pattern-based code analysis
- Counts towards
- Vulnerability
- File
- /pkg/handlers/update.go line 484
- Likely real
- Yes, 96% confidence
The application builds a file path from potentially untrusted data, which can lead to a path traversal vulnerability. An attacker can manipulate the path which the application uses to access files. If the application does not validate user input and sanitize file paths, sensitive files such as configuration or user data can be accessed, potentially creating or overwriting files. To prevent this vulnerability, validate and sanitize any input that is used to create references to file paths. Also, enforce strict file access controls. For example, choose privileges allowing public-facing applications to access only the required files. In Go, it is possible to sanitize user input and mitigate path traversal by using the built-in `filepath.Clean` function.
file, err := os.Create(fileName) -
- Engine
- Semgrep · Pattern-based code analysis
- Counts towards
- Vulnerability
- File
- /pkg/handlers/airgap.go line 205
- Likely real
- Yes, 96% confidence
The application builds a file path from potentially untrusted data, which can lead to a path traversal vulnerability. An attacker can manipulate the path which the application uses to access files. If the application does not validate user input and sanitize file paths, sensitive files such as configuration or user data can be accessed, potentially creating or overwriting files. To prevent this vulnerability, validate and sanitize any input that is used to create references to file paths. Also, enforce strict file access controls. For example, choose privileges allowing public-facing applications to access only the required files. In Go, it is possible to sanitize user input and mitigate path traversal by using the built-in `filepath.Clean` function.
f, err := os.Create(airgapBundlePath) -
- Engine
- Semgrep · Pattern-based code analysis
- Counts towards
- Vulnerability
- File
- /pkg/handlers/airgap.go line 225
- Likely real
- Yes, 95% confidence
The application builds a file path from potentially untrusted data, which can lead to a path traversal vulnerability. An attacker can manipulate the path which the application uses to access files. If the application does not validate user input and sanitize file paths, sensitive files such as configuration or user data can be accessed, potentially creating or overwriting files. To prevent this vulnerability, validate and sanitize any input that is used to create references to file paths. Also, enforce strict file access controls. For example, choose privileges allowing public-facing applications to access only the required files. In Go, it is possible to sanitize user input and mitigate path traversal by using the built-in `filepath.Clean` function.
airgapBundle, err := os.OpenFile(airgapBundlePath, os.O_RDWR, 0644) -
- Engine
- GuardDog · Supply-chain attack heuristics
- Counts towards
- Malicious pattern
- File
- /web/src/components/config_render/ConfigGroup.jsx line 40
- Likely real
- Yes, 95% confidence
Detects download-and-execute patterns: fetching a remote file then executing it [threat-process-download-exec]
if (props.handleDownloadFile) { props.handleDownloadFile(itemName); } }; -
- Engine
- GuardDog · Supply-chain attack heuristics
- Counts towards
- Malicious pattern
- File
- /web/src/components/config_render/ConfigFileInput.jsx line 101
- Likely real
- Yes, 95% confidence
Detects download-and-execute patterns: fetching a remote file then executing it [threat-process-download-exec]
handleDownloadFile={(fileName) => this.props.handleDownloadFile(fileName) } /> -
- Engine
- GuardDog · Supply-chain attack heuristics
- Counts towards
- Malicious pattern
- File
- /web/src/components/config_render/ConfigGroups.jsx line 25
- Likely real
- Yes, 95% confidence
Detects download-and-execute patterns: fetching a remote file then executing it [threat-process-download-exec]
if (this.props.handleDownloadFile) { this.props.handleDownloadFile(filename); } }; -
- Engine
- GuardDog · Supply-chain attack heuristics
- Counts towards
- Malicious pattern
- File
- /pkg/operator/client/deploy.go line 184
- Likely real
- Yes, 91% confidence
Detects base64 decoding followed by code execution [threat-runtime-obfuscation-base64exec]
decoded, err := base64.StdEncoding.DecodeString(deployArgs.Manifests) if err != nil { return nil, errors.Wrap(err, "failed to decode manifests") -
- Engine
- Semgrep · Pattern-based code analysis
- Counts towards
- Vulnerability
- File
- /.github/workflows/release.yaml line 70
- Likely real
- Yes, 87% confidence
This workflow uses `secrets: inherit` to pass all of the calling workflow's secrets to a reusable workflow. This violates the principle of least privilege because the called workflow receives access to every secret in the repository, not just the ones it needs. If the called workflow is compromised or sourced from a third party, an attacker gains access to all repository secrets. Instead, explicitly pass only the secrets that the called workflow requires using the `secrets:` map, e.g. `secrets: { MY_SECRET: ${{ secrets.MY_SECRET }} }`.
secrets: inherit -
- Engine
- Semgrep · Pattern-based code analysis
- Counts towards
- Vulnerability
- File
- /e2e/playwright/regression/shared/cli.ts line 583
- Likely real
- Yes, 84% confidence
Detected calls to child_process from a function argument `command`. This could lead to a command injection if the input is user controllable. Try to avoid calls to child_process, and if it is needed ensure user input is correctly sanitized or sandboxed.
execSync(command, {stdio: 'inherit'}); -
- Engine
- Semgrep · Pattern-based code analysis
- Counts towards
- Vulnerability
- File
- /e2e/playwright/regression/shared/cli.ts line 591
- Likely real
- Yes, 84% confidence
Detected calls to child_process from a function argument `command`. This could lead to a command injection if the input is user controllable. Try to avoid calls to child_process, and if it is needed ensure user input is correctly sanitized or sandboxed.
return execSync(command).toString(); -
- Engine
- Semgrep · Pattern-based code analysis
- Counts towards
- Vulnerability
- File
- /e2e/playwright/shared-core/support-bundle.ts line 237
- Likely real
- Yes, 84% confidence
Detected calls to child_process from a function argument `command`. This could lead to a command injection if the input is user controllable. Try to avoid calls to child_process, and if it is needed ensure user input is correctly sanitized or sandboxed.
execSync(fixedCommand, {stdio: 'inherit'}); -
- Engine
- Semgrep · Pattern-based code analysis
- Counts towards
- Vulnerability
- File
- /.github/actions/scan-image/action.yml line 77
- Likely real
- Yes, 57% confidence
Using variable interpolation `${{...}}` with `github` context data in a `run:` step could allow an attacker to inject their own code into the runner. This would allow them to steal secrets and code. `github` context data can have arbitrary user input and should be treated as untrusted. Instead, use an intermediate environment variable with `env:` to store the data and use the environment variable in the `run:` script. Be sure to use double-quotes the environment variable, like this: "$ENVVAR".
run: | echo "::error::Scan failed for image ${{ inputs.image-ref }}" echo "Please check the scan logs above for details" exit 1 -
- Engine
- Semgrep · Pattern-based code analysis
- Counts towards
- Vulnerability
- File
- /.github/workflows/regression.yaml line 240
- Likely real
- Yes, 57% confidence
Using variable interpolation `${{...}}` with `github` context data in a `run:` step could allow an attacker to inject their own code into the runner. This would allow them to steal secrets and code. `github` context data can have arbitrary user input and should be treated as untrusted. Instead, use an intermediate environment variable with `env:` to store the data and use the environment variable in the `run:` script. Be sure to use double-quotes the environment variable, like this: "$ENVVAR".
run: | export CURRENT_TAG="${{ github.event.inputs.version_tag_old || inputs.version_tag_old }}" export NEXT_TAG="${{ github.event.inputs.version_tag_new || inputs.version_tag_new }}" if [ "${{ matrix.test.is_upgrade }}" == "1" ]; then export TF_VAR_kots_version_initial="${CURRENT_TAG:1}" export TF_VAR_kots_version_upgrade="${NEXT_TAG:1}" else export TF_VAR_kots_version_initial="${NEXT_TAG:1}" fi export TF_VAR_kots_addon_package_url="${{ github.event.inputs.addon_package_url || inputs.addon_package_url }}" export TF_VAR_testim_branch="master" export TF_VAR_expires_on="${{ needs.get-workspace-expiration.outputs.expiration }}" ./${{ matrix.test.terraform_script }} apply -
- Engine
- Semgrep · Pattern-based code analysis
- Counts towards
- Vulnerability
- File
- /.github/actions/scan-image/action.yml line 85
- Likely real
- Yes, 57% confidence
Using variable interpolation `${{...}}` with `github` context data in a `run:` step could allow an attacker to inject their own code into the runner. This would allow them to steal secrets and code. `github` context data can have arbitrary user input and should be treated as untrusted. Instead, use an intermediate environment variable with `env:` to store the data and use the environment variable in the `run:` script. Be sure to use double-quotes the environment variable, like this: "$ENVVAR".
run: | if [ ! -f ${{ inputs.output-file }} ]; then echo "No SARIF file found — creating minimal empty SARIF" echo '{"version":"2.1.0","runs":[{"tool":{"driver":{"name":"Anchore Grype","informationUri":"https://github.com/anchore/grype","rules":[]}},"results":[],"properties":{"isFallbackSarif":true}}]}' > ${{ inputs.output-file }} fi # Validate SARIF file before enrichment if ! jq empty ${{ inputs.output-file }}; then echo "::error::Invalid SARIF file detected" exit 1 fi # Create a backup of the original file cp ${{ inputs.output-file }} ${{ inputs.output-file }}.bak # Attempt to enrich the SARIF file if ! jq --arg imageRef "${{ inputs.image-ref }}" \ --arg repo "replicatedhq/kots" \ --arg name "${{ steps.image_details.outputs.image_name }}" \ --arg tag "${{ steps.image_details.outputs.image_tag }}" \ --arg scanTime "$(date -u +"%Y-%m-%dT%H:%M:%SZ")" \ ' def strip_registry: if startswith("docker.io/") then sub("^docker\\.io/"; "") else . end; def make_asset_id: "image:" + (. | strip_registry); .runs[0].properties = { "imageRef": ($imageRef | strip_registry), "repository": $repo, "scanTime": $scanTime, "DisplayName": ($name + ":" + $tag | make_asset_id), "UniqueID": ($name + ":" + $tag | make_asset_id), "imageMetadata": { "name": ($name | strip_registry), "tag": $tag, "annotations": { "scanTime": $scanTime, "tool": "grype", "toolVersion": "latest" } } } | .runs[0].results = [ .runs[0].results[] | . + { "fingerprints": { "0": ( .ruleId + ":" + (.locations[0].physicalLocation.artifactLocation.uri | split("//")[0]) + ":" + (.locations[0].physicalLocation.artifactLocation.uri | split("//")[1]) ) } } ]' ${{ inputs.output-file }} > enriched-results.sarif; then echo "::error::Failed to enrich SARIF file" # Restore the backup mv ${{ inputs.output-file }}.bak ${{ inputs.output-file }} exit 1 fi # Validate the enriched file if ! jq empty enriched-results.sarif; then echo "::error::Invalid enriched SARIF file" # Restore the backup mv ${{ inputs.output-file }}.bak ${{ inputs.output-file }} exit 1 fi mv enriched-results.sarif ${{ inputs.output-file }} rm -f ${{ inputs.output-file }}.bak -
- Engine
- Semgrep · Pattern-based code analysis
- Counts towards
- Vulnerability
- File
- /.github/workflows/e2e-workspace-cleanup.yaml line 84
- Likely real
- Yes, 57% confidence
Using variable interpolation `${{...}}` with `github` context data in a `run:` step could allow an attacker to inject their own code into the runner. This would allow them to steal secrets and code. `github` context data can have arbitrary user input and should be treated as untrusted. Instead, use an intermediate environment variable with `env:` to store the data and use the environment variable in the `run:` script. Be sure to use double-quotes the environment variable, like this: "$ENVVAR".
run: terraform workspace delete ${{ github.event.inputs.workspace || github.event.client_payload.workspace }} -
- Engine
- Semgrep · Pattern-based code analysis
- Counts towards
- Vulnerability
- File
- /.github/workflows/e2e-workspace-cleanup.yaml line 112
- Likely real
- Yes, 57% confidence
Using variable interpolation `${{...}}` with `github` context data in a `run:` step could allow an attacker to inject their own code into the runner. This would allow them to steal secrets and code. `github` context data can have arbitrary user input and should be treated as untrusted. Instead, use an intermediate environment variable with `env:` to store the data and use the environment variable in the `run:` script. Be sure to use double-quotes the environment variable, like this: "$ENVVAR".
run: terraform workspace delete ${{ github.event.inputs.workspace || github.event.client_payload.workspace }} -
- Engine
- Semgrep · Pattern-based code analysis
- Counts towards
- Vulnerability
- File
- /.github/workflows/promote-kurl-release.yaml line 39
- Likely real
- Yes, 57% confidence
Using variable interpolation `${{...}}` with `github` context data in a `run:` step could allow an attacker to inject their own code into the runner. This would allow them to steal secrets and code. `github` context data can have arbitrary user input and should be treated as untrusted. Instead, use an intermediate environment variable with `env:` to store the data and use the environment variable in the `run:` script. Be sure to use double-quotes the environment variable, like this: "$ENVVAR".
run: | if [ "${{ github.event_name }}" == "release" ]; then VERSION="${{ github.ref_name }}" VERSION="${VERSION#v}" # remove the 'v' prefix { echo "addon_version=${VERSION}" echo "is_release=true" echo "no_publish=false" } >> "$GITHUB_OUTPUT" else VERSION="${{ inputs.addon_version }}" VERSION="${VERSION#v}" # remove the 'v' prefix { echo "addon_version=${VERSION}" echo "is_release=${{ inputs.is_release }}" echo "no_publish=${{ inputs.no_publish }}" } >> "$GITHUB_OUTPUT" fi -
- Engine
- Semgrep · Pattern-based code analysis
- Counts towards
- Vulnerability
- File
- /.github/workflows/regression.yaml line 142
- Likely real
- Yes, 57% confidence
Using variable interpolation `${{...}}` with `github` context data in a `run:` step could allow an attacker to inject their own code into the runner. This would allow them to steal secrets and code. `github` context data can have arbitrary user input and should be treated as untrusted. Instead, use an intermediate environment variable with `env:` to store the data and use the environment variable in the `run:` script. Be sure to use double-quotes the environment variable, like this: "$ENVVAR".
run: | export TF_VAR_expires_on="${{ needs.get-workspace-expiration.outputs.expiration }}" export TF_VAR_kots_branch="${{ github.ref_name }}" terraform apply --auto-approve -
- Engine
- Semgrep · Pattern-based code analysis
- Counts towards
- Vulnerability
- File
- /.github/actions/kurl-addon-kots-generate/action.yml line 69
- Likely real
- Yes, 57% confidence
Using variable interpolation `${{...}}` with `github` context data in a `run:` step could allow an attacker to inject their own code into the runner. This would allow them to steal secrets and code. `github` context data can have arbitrary user input and should be treated as untrusted. Instead, use an intermediate environment variable with `env:` to store the data and use the environment variable in the `run:` script. Be sure to use double-quotes the environment variable, like this: "$ENVVAR".
run: | out=${{ inputs.s3_prefix }}kotsadm-${{ inputs.addon_version }}-${GITHUB_SHA:0:7}.tar.gz aws s3 cp kotsadm-${{ inputs.addon_version }}.tar.gz s3://kots-kurl-addons-production-1658439274/$out echo "addon_package_url=https://kots-kurl-addons-production-1658439274.s3.amazonaws.com/$out" >> "$GITHUB_OUTPUT" -
- Engine
- Semgrep · Pattern-based code analysis
- Counts towards
- Vulnerability
- File
- /.github/workflows/release.yaml line 30
- Likely real
- Yes, 57% confidence
Using variable interpolation `${{...}}` with `github` context data in a `run:` step could allow an attacker to inject their own code into the runner. This would allow them to steal secrets and code. `github` context data can have arbitrary user input and should be treated as untrusted. Instead, use an intermediate environment variable with `env:` to store the data and use the environment variable in the `run:` script. Be sure to use double-quotes the environment variable, like this: "$ENVVAR".
run: | if [[ "${{ github.event_name }}" == "workflow_dispatch" ]]; then echo "tag=sha${GITHUB_SHA:0:7}" >> "$GITHUB_OUTPUT" elif [[ "${{ github.ref_type }}" == "branch" ]]; then echo "tag=$GENERATED_TAG" >> "$GITHUB_OUTPUT" else echo "tag=${{ github.ref_name }}" >> "$GITHUB_OUTPUT" fi -
- Engine
- Semgrep · Pattern-based code analysis
- Counts towards
- Vulnerability
- File
- /.github/workflows/release-for-ec.yaml line 96
- Likely real
- Yes, 57% confidence
Using variable interpolation `${{...}}` with `github` context data in a `run:` step could allow an attacker to inject their own code into the runner. This would allow them to steal secrets and code. `github` context data can have arbitrary user input and should be treated as untrusted. Instead, use an intermediate environment variable with `env:` to store the data and use the environment variable in the `run:` script. Be sure to use double-quotes the environment variable, like this: "$ENVVAR".
run: | git tag "${{ inputs.tag }}+${GITHUB_SHA:0:7}" git push origin "${{ inputs.tag }}+${GITHUB_SHA:0:7}" -
- Engine
- Semgrep · Pattern-based code analysis
- Counts towards
- Vulnerability
- File
- /.github/workflows/release-for-ec.yaml line 19
- Likely real
- Yes, 57% confidence
Using variable interpolation `${{...}}` with `github` context data in a `run:` step could allow an attacker to inject their own code into the runner. This would allow them to steal secrets and code. `github` context data can have arbitrary user input and should be treated as untrusted. Instead, use an intermediate environment variable with `env:` to store the data and use the environment variable in the `run:` script. Be sure to use double-quotes the environment variable, like this: "$ENVVAR".
run: | if ! [[ "${{ inputs.tag }}" =~ ^v ]]; then echo "Error: Tag must start with 'v' (e.g. v1.128.2-ec.1)" exit 1 fi if ! [[ "${{ inputs.tag }}" =~ -ec\.[0-9]+$ ]]; then echo "Error: Tag must end with -ec.<digit> suffix (e.g. v1.128.2-ec.1)" exit 1 fi echo "Tag format is valid: ${{ inputs.tag }}" -
- Engine
- Semgrep · Pattern-based code analysis
- Counts towards
- Vulnerability
- File
- /.github/actions/scan-image/action.yml line 46
- Likely real
- Yes, 57% confidence
Using variable interpolation `${{...}}` with `github` context data in a `run:` step could allow an attacker to inject their own code into the runner. This would allow them to steal secrets and code. `github` context data can have arbitrary user input and should be treated as untrusted. Instead, use an intermediate environment variable with `env:` to store the data and use the environment variable in the `run:` script. Be sure to use double-quotes the environment variable, like this: "$ENVVAR".
run: | IMAGE_NAME=$(echo "${{ inputs.image-ref }}" | cut -d':' -f1) IMAGE_TAG=$(echo "${{ inputs.image-ref }}" | cut -d':' -f2) [[ "$IMAGE_TAG" == "$IMAGE_NAME" ]] && IMAGE_TAG="latest" SAFE_NAME=$(echo "${IMAGE_NAME}-${IMAGE_TAG}" | sed 's/[\/:]/-/g') SAFE_IMAGE_NAME=$(echo "${IMAGE_NAME}" | sed 's/[\/:]/-/g') { echo "image_name=${IMAGE_NAME}" echo "image_tag=${IMAGE_TAG}" echo "safe_name=${SAFE_NAME}" echo "safe_image_name=${SAFE_IMAGE_NAME}" } >> "$GITHUB_OUTPUT" -
- Engine
- Semgrep · Pattern-based code analysis
- Counts towards
- Vulnerability
- File
- /.github/actions/kurl-addon-kots-generate/action.yml line 61
- Likely real
- Yes, 57% confidence
Using variable interpolation `${{...}}` with `github` context data in a `run:` step could allow an attacker to inject their own code into the runner. This would allow them to steal secrets and code. `github` context data can have arbitrary user input and should be treated as untrusted. Instead, use an intermediate environment variable with `env:` to store the data and use the environment variable in the `run:` script. Be sure to use double-quotes the environment variable, like this: "$ENVVAR".
run: | mkdir -p addons/kotsadm cp -R ${{ inputs.addon_version }} addons/kotsadm/ tar -czvf kotsadm-${{ inputs.addon_version }}.tar.gz addons -
- Engine
- Semgrep · Pattern-based code analysis
- Counts towards
- Vulnerability
- File
- /.github/actions/kurl-addon-kots-generate/action.yml line 38
- Likely real
- Yes, 57% confidence
Using variable interpolation `${{...}}` with `github` context data in a `run:` step could allow an attacker to inject their own code into the runner. This would allow them to steal secrets and code. `github` context data can have arbitrary user input and should be treated as untrusted. Instead, use an intermediate environment variable with `env:` to store the data and use the environment variable in the `run:` script. Be sure to use double-quotes the environment variable, like this: "$ENVVAR".
run: | kotsadm_binary=${{ inputs.kotsadm_binary_override }} # absolute path if [ -n "$kotsadm_binary" ]; then kotsadm_binary="$(realpath "$kotsadm_binary")" fi ( cd ${{ github.action_path }}/../../../deploy/kurl/kotsadm/template; \ ./generate.sh \ "${{ inputs.addon_version }}" \ "${{ inputs.kotsadm_image_registry }}" \ "${{ inputs.kotsadm_image_namespace }}" \ "${{ inputs.kotsadm_image_tag }}" \ "$kotsadm_binary" ) mv ${{ github.action_path }}/../../../deploy/kurl/kotsadm/${{ inputs.addon_version }} . -
- Engine
- Semgrep · Pattern-based code analysis
- Counts towards
- Vulnerability
- File
- /.github/actions/kots-e2e/action.yml line 108
- Likely real
- Yes, 57% confidence
Using variable interpolation `${{...}}` with `github` context data in a `run:` step could allow an attacker to inject their own code into the runner. This would allow them to steal secrets and code. `github` context data can have arbitrary user input and should be treated as untrusted. Instead, use an intermediate environment variable with `env:` to store the data and use the environment variable in the `run:` script. Be sure to use double-quotes the environment variable, like this: "$ENVVAR".
run: | make -C e2e test \ FOCUS="${{ inputs.test-id }}" \ EXISTING_KUBECONFIG=$KUBECONFIG \ KOTSADM_IMAGE_REGISTRY=${{ inputs.kotsadm-image-registry }} \ KOTSADM_IMAGE_NAMESPACE=${{ inputs.kotsadm-image-namespace || format('automated-{0}', github.run_id) }} \ KOTSADM_IMAGE_TAG=${{ inputs.kotsadm-image-tag }} \ KOTS_HELM_CHART_URL=${{ inputs.kots-helm-chart-url }} \ KOTS_HELM_CHART_VERSION=${{ inputs.kots-helm-chart-version }} \ KOTS_DOCKERHUB_USERNAME=${{ inputs.kots-dockerhub-username }} \ KOTS_DOCKERHUB_PASSWORD=${{ inputs.kots-dockerhub-password }} \ AWS_ACCESS_KEY_ID=${{ inputs.aws-access-key-id }} \ AWS_SECRET_ACCESS_KEY=${{ inputs.aws-secret-access-key }} \ AIRGAP=${{ inputs.kots-airgap }} \ IS_OPENSHIFT=${{ inputs.k8s-distribution == 'openshift' && 'true' || 'false' }} \ IS_EKS=${{ inputs.k8s-distribution == 'eks' && 'true' || 'false' }} \ GIT_TAG=${{ inputs.git-tag }} \ SKIP_TEARDOWN=1 -
- Engine
- Semgrep · Pattern-based code analysis
- Counts towards
- Vulnerability
- File
- /.github/actions/build-dep-image-with-apko/action.yml line 33
- Likely real
- Yes, 57% confidence
Using variable interpolation `${{...}}` with `github` context data in a `run:` step could allow an attacker to inject their own code into the runner. This would allow them to steal secrets and code. `github` context data can have arbitrary user input and should be treated as untrusted. Instead, use an intermediate environment variable with `env:` to store the data and use the environment variable in the `run:` script. Be sure to use double-quotes the environment variable, like this: "$ENVVAR".
run: | set -euo pipefail if docker manifest inspect ${{ inputs.image-name }} > /dev/null 2>&1; then echo "Image already exists. Will not overwrite." echo "image-exists=true" >> "$GITHUB_OUTPUT" else echo "Image does not exist. Will build and push." echo "image-exists=false" >> "$GITHUB_OUTPUT" fi -
- Engine
- Semgrep · Pattern-based code analysis
- Counts towards
- Vulnerability
- File
- /.github/workflows/publish-securebuild.yml line 41
- Likely real
- Yes, 57% confidence
Using variable interpolation `${{...}}` with `github` context data in a `run:` step could allow an attacker to inject their own code into the runner. This would allow them to steal secrets and code. `github` context data can have arbitrary user input and should be treated as untrusted. Instead, use an intermediate environment variable with `env:` to store the data and use the environment variable in the `run:` script. Be sure to use double-quotes the environment variable, like this: "$ENVVAR".
run: | echo "version=${{ inputs.version }}" >> "$GITHUB_OUTPUT" -
- Engine
- Semgrep · Pattern-based code analysis
- Counts towards
- Vulnerability
- File
- /dev/manifests/kotsadm/deployment.yaml line 84
- Likely real
- Uncertain, 49% confidence
bcrypt hash detected
value: $2a$10$xZRsZCYgRDG90N1QEjBxGOBDrDGE.rpcMENV4qNNo7pozYTEPGMwS -
- Engine
- Semgrep · Pattern-based code analysis
- Counts towards
- Vulnerability
- File
- /pkg/docker/registry/temp_registry.go line 70
- Likely real
- Uncertain, 47% confidence
Detected non-static command inside Command. Audit the input to 'exec.Command'. If unverified user data can reach this call site, this is a code injection vulnerability. A malicious actor can inject a malicious script to execute arbitrary code.
cmd := exec.Command(kotsutil.GetKOTSBinPath(), "docker-registry", "serve", configFile.Name()) -
- Engine
- Semgrep · Pattern-based code analysis
- Counts towards
- Vulnerability
- File
- /pkg/apparchive/helm-v1beta1.go line 133
- Likely real
- Uncertain, 47% confidence
Detected non-static command inside Command. Audit the input to 'exec.Command'. If unverified user data can reach this call site, this is a code injection vulnerability. A malicious actor can inject a malicious script to execute arbitrary code.
archiveChartOutput, err := exec.Command(kustomizeBinPath, "build", filepath.Dir(path)).Output() -
- Engine
- Semgrep · Pattern-based code analysis
- Counts towards
- Vulnerability
- File
- /pkg/apparchive/app.go line 178
- Likely real
- Uncertain, 47% confidence
Detected non-static command inside Command. Audit the input to 'exec.Command'. If unverified user data can reach this call site, this is a code injection vulnerability. A malicious actor can inject a malicious script to execute arbitrary code.
allContent, err := exec.Command(kustomizeBinPath, "build", kustomizeBuildTarget).Output() -
- Engine
- Semgrep · Pattern-based code analysis
- Counts towards
- Vulnerability
- File
- /pkg/apparchive/app.go line 58
- Likely real
- Uncertain, 47% confidence
Detected non-static command inside Command. Audit the input to 'exec.Command'. If unverified user data can reach this call site, this is a code injection vulnerability. A malicious actor can inject a malicious script to execute arbitrary code.
renderedApp, err := exec.Command(options.KustomizeBinPath, "build", kustomizeBuildTarget).Output() -
- Engine
- Semgrep · Pattern-based code analysis
- Counts towards
- Vulnerability
- File
- /pkg/airgap/update.go line 46
- Likely real
- Uncertain, 47% confidence
Detected non-static command inside Command. Audit the input to 'exec.Command'. If unverified user data can reach this call site, this is a code injection vulnerability. A malicious actor can inject a malicious script to execute arbitrary code.
cmd := exec.Command(kotsBin, "airgap-update", appSlug, "-n", util.PodNamespace, "--airgap-bundle", airgapBundlePath, "--from-api", "--task-id", taskID) -
- Engine
- Semgrep · Pattern-based code analysis
- Counts towards
- Vulnerability
- File
- /pkg/embeddedcluster/artifacts.go line 80
- Likely real
- Uncertain, 46% confidence
Detected non-static command inside Command. Audit the input to 'exec.Command'. If unverified user data can reach this call site, this is a code injection vulnerability. A malicious actor can inject a malicious script to execute arbitrary code.
cmd := exec.CommandContext(ctx, bin, args...) -
- Engine
- Semgrep · Pattern-based code analysis
- Counts towards
- Vulnerability
- File
- /pkg/embeddedcluster/upgrade.go line 159
- Likely real
- Uncertain, 46% confidence
Detected non-static command inside Command. Audit the input to 'exec.Command'. If unverified user data can reach this call site, this is a code injection vulnerability. A malicious actor can inject a malicious script to execute arbitrary code.
cmd := exec.CommandContext(ctx, bin, args...) -
- Engine
- Semgrep · Pattern-based code analysis
- Counts towards
- Vulnerability
- File
- /pkg/operator/applier/kubectl.go line 221
- Likely real
- Uncertain, 46% confidence
Detected non-static command inside Command. Audit the input to 'exec.Command'. If unverified user data can reach this call site, this is a code injection vulnerability. A malicious actor can inject a malicious script to execute arbitrary code.
renderedManifest, err := exec.Command(c.kustomize, "build", tmp).Output() -
- Engine
- Semgrep · Pattern-based code analysis
- Counts towards
- Vulnerability
- File
- /pkg/operator/applier/kubectl.go line 300
- Likely real
- Uncertain, 46% confidence
Detected non-static command inside Command. Audit the input to 'exec.Command'. If unverified user data can reach this call site, this is a code injection vulnerability. A malicious actor can inject a malicious script to execute arbitrary code.
return exec.Command(c.kubectl, append(args, c.connectArgs()...)...) -
- Engine
- Semgrep · Pattern-based code analysis
- Counts towards
- Vulnerability
- File
- /pkg/upgradeservice/process.go line 112
- Likely real
- Uncertain, 46% confidence
Detected non-static command inside Command. Audit the input to 'exec.Command'. If unverified user data can reach this call site, this is a code injection vulnerability. A malicious actor can inject a malicious script to execute arbitrary code.
cmd := exec.Command(params.UpdateKOTSBin, "upgrade-service", "start", "-") -
- Engine
- Semgrep · Pattern-based code analysis
- Counts towards
- Vulnerability
- File
- /e2e/Dockerfile line 19
- Likely real
- Probably noise, 22% confidence
By not specifying a USER, a program in the container may run as 'root'. This is a security hazard. If an attacker can control a process running as root, they may have control over the container. Ensure that the last USER in a Dockerfile is a USER other than 'root'.
CMD [ "/bin/bash" ] -
- Engine
- Semgrep · Pattern-based code analysis
- Counts towards
- Vulnerability
- File
- /.github/actions/copy-assets/Dockerfile line 11
- Likely real
- Probably noise, 22% confidence
By not specifying a USER, a program in the container may run as 'root'. This is a security hazard. If an attacker can control a process running as root, they may have control over the container. Ensure that the last USER in a Dockerfile is a USER other than 'root'.
ENTRYPOINT ["/copy-assets"] -
- Engine
- YARA · Malware signature rules
- Counts towards
- Malicious pattern
- File
- /.github/actions/cmx-versions/dist/index.js
- Likely real
- Probably noise, 3% confidence
YARA rule matched: detect_base64_exec — Encoded payload decoded and then executed
-
- Engine
- YARA · Malware signature rules
- Counts towards
- Malicious pattern
- File
- /.github/actions/kurl-addon-kots-publisher/dist/index.js
- Likely real
- Probably noise, 3% confidence
YARA rule matched: detect_base64_exec — Encoded payload decoded and then executed
-
- Engine
- YARA · Malware signature rules
- Counts towards
- Malicious pattern
- File
- /.github/actions/version-tag/dist/index.js
- Likely real
- Probably noise, 3% confidence
YARA rule matched: detect_base64_exec — Encoded payload decoded and then executed
-
- Engine
- YARA · Malware signature rules
- Counts towards
- Malicious pattern
- File
- /.github/actions/version-tag/dist/index.js
- Likely real
- Probably noise, 1% confidence
YARA rule matched: detect_download_and_execute — Downloads a remote resource AND executes it - the actually dangerous combination, not just downloading alone
-
- Engine
- YARA · Malware signature rules
- Counts towards
- Malicious pattern
- File
- /e2e/scripts/deps.sh
- Likely real
- Probably noise, 1% confidence
YARA rule matched: detect_download_and_execute — Downloads a remote resource AND executes it - the actually dangerous combination, not just downloading alone
-
- Engine
- YARA · Malware signature rules
- Counts towards
- Malicious pattern
- File
- /cmd/kots/cli/check-version.go
- Likely real
- Probably noise, 1% confidence
YARA rule matched: detect_download_and_execute — Downloads a remote resource AND executes it - the actually dangerous combination, not just downloading alone
-
- Engine
- YARA · Malware signature rules
- Counts towards
- Malicious pattern
- File
- /cmd/kots/cli/version.go
- Likely real
- Probably noise, 1% confidence
YARA rule matched: detect_download_and_execute — Downloads a remote resource AND executes it - the actually dangerous combination, not just downloading alone
-
- Engine
- YARA · Malware signature rules
- Counts towards
- Malicious pattern
- File
- /dev/dockerfiles/kotsadm/Dockerfile.ttlsh
- Likely real
- Probably noise, 1% confidence
YARA rule matched: detect_download_and_execute — Downloads a remote resource AND executes it - the actually dangerous combination, not just downloading alone
-
- Engine
- YARA · Malware signature rules
- Counts towards
- Malicious pattern
- File
- /dev/dockerfiles/kotsadm/Dockerfile.local
- Likely real
- Probably noise, 1% confidence
YARA rule matched: detect_download_and_execute — Downloads a remote resource AND executes it - the actually dangerous combination, not just downloading alone
-
- Engine
- YARA · Malware signature rules
- Counts towards
- Malicious pattern
- File
- /Makefile
- Likely real
- Probably noise, 1% confidence
YARA rule matched: detect_download_and_execute — Downloads a remote resource AND executes it - the actually dangerous combination, not just downloading alone
-
- Engine
- YARA · Malware signature rules
- Counts towards
- Malicious pattern
- File
- /pkg/preflight/preflight.go
- Likely real
- Probably noise, 1% confidence
YARA rule matched: detect_download_and_execute — Downloads a remote resource AND executes it - the actually dangerous combination, not just downloading alone
-
- Engine
- YARA · Malware signature rules
- Counts towards
- Malicious pattern
- File
- /pkg/supportbundle/supportbundle.go
- Likely real
- Probably noise, 1% confidence
YARA rule matched: detect_download_and_execute — Downloads a remote resource AND executes it - the actually dangerous combination, not just downloading alone
-
- Engine
- YARA · Malware signature rules
- Counts towards
- Malicious pattern
- File
- /pkg/handlers/troubleshoot.go
- Likely real
- Probably noise, 1% confidence
YARA rule matched: detect_download_and_execute — Downloads a remote resource AND executes it - the actually dangerous combination, not just downloading alone
-
- Engine
- YARA · Malware signature rules
- Counts towards
- Malicious pattern
- File
- /.github/actions/cmx-versions/dist/index.js
- Likely real
- Probably noise, 1% confidence
YARA rule matched: detect_download_and_execute — Downloads a remote resource AND executes it - the actually dangerous combination, not just downloading alone
-
- Engine
- YARA · Malware signature rules
- Counts towards
- Malicious pattern
- File
- /.github/actions/kurl-addon-kots-publisher/dist/index.js
- Likely real
- Probably noise, 1% confidence
YARA rule matched: detect_download_and_execute — Downloads a remote resource AND executes it - the actually dangerous combination, not just downloading alone
-
- Engine
- YARA · Malware signature rules
- Counts towards
- Malicious pattern
- File
- /.github/actions/kurl-addon-kots-publisher/dist/index.js
- Likely real
- Probably noise, 1% confidence
YARA rule matched: detect_obfuscated_string_execution — Reconstructs a string character-by-character or from hex escapes, then immediately executes it - fromCharCode/chr() alone are common in ordinary text-processing code, so this requires both the reconstruction and an execution call together
-
- Engine
- YARA · Malware signature rules
- Counts towards
- Malicious pattern
- File
- /.github/actions/version-tag/dist/index.js
- Likely real
- Probably noise, 1% confidence
YARA rule matched: detect_obfuscated_string_execution — Reconstructs a string character-by-character or from hex escapes, then immediately executes it - fromCharCode/chr() alone are common in ordinary text-processing code, so this requires both the reconstruction and an execution call together
-
- Engine
- YARA · Malware signature rules
- Counts towards
- Malicious pattern
- File
- /.github/actions/cmx-versions/dist/index.js
- Likely real
- Probably noise, 1% confidence
YARA rule matched: detect_obfuscated_string_execution — Reconstructs a string character-by-character or from hex escapes, then immediately executes it - fromCharCode/chr() alone are common in ordinary text-processing code, so this requires both the reconstruction and an execution call together
-
- Engine
- YARA · Malware signature rules
- Counts towards
- Malicious pattern
- File
- /cmd/kotsadm/cli/completion.go
- Likely real
- Probably noise, 0% confidence
YARA rule matched: detect_persistence_mechanism — Modifies a startup/scheduling location - legitimate application code essentially never does this
-
- Engine
- YARA · Malware signature rules
- Counts towards
- Malicious pattern
- File
- /cmd/kots/cli/completion.go
- Likely real
- Probably noise, 0% confidence
YARA rule matched: detect_persistence_mechanism — Modifies a startup/scheduling location - legitimate application code essentially never does this
-
- Engine
- Semgrep · Pattern-based code analysis
- Counts towards
- Vulnerability
- File
- /e2e/playwright/regression/shared/version-history.ts line 180
- Likely real
- Yes, 100% confidence
RegExp() called with a `expectedSequence` function argument, this might allow an attacker to cause a Regular Expression Denial-of-Service (ReDoS) within your application as RegExP blocks the main thread. For this reason, it is recommended to use hardcoded regexes instead. If your regex is run on user-controlled input, consider performing input validation or use a regex checking/sanitization library such as https://www.npmjs.com/package/recheck to verify that the regex does not appear vulnerable to ReDoS.
await expect(versionRow).toContainText(new RegExp(`Sequence ${expectedSequence}.*Currently deployed version`), { timeout: 45000 }); -
- Engine
- Semgrep · Pattern-based code analysis
- Counts towards
- Vulnerability
- File
- /.github/actions/cmx-versions/test.js line 52
- Likely real
- Yes, 100% confidence
RegExp() called with a `functionName` function argument, this might allow an attacker to cause a Regular Expression Denial-of-Service (ReDoS) within your application as RegExP blocks the main thread. For this reason, it is recommended to use hardcoded regexes instead. If your regex is run on user-controlled input, consider performing input validation or use a regex checking/sanitization library such as https://www.npmjs.com/package/recheck to verify that the regex does not appear vulnerable to ReDoS.
const functionRegex = new RegExp(`function\\s+${functionName}\\s*\\([^)]*\\)\\s*{[\\s\\S]*?\\n}`); -
- Engine
- Semgrep · Pattern-based code analysis
- Counts towards
- Vulnerability
- File
- /e2e/playwright/regression/shared/version-history.ts line 221
- Likely real
- Yes, 100% confidence
RegExp() called with a `sequence` function argument, this might allow an attacker to cause a Regular Expression Denial-of-Service (ReDoS) within your application as RegExP blocks the main thread. For this reason, it is recommended to use hardcoded regexes instead. If your regex is run on user-controlled input, consider performing input validation or use a regex checking/sanitization library such as https://www.npmjs.com/package/recheck to verify that the regex does not appear vulnerable to ReDoS.
await expect(versionRow).toContainText(new RegExp(`Sequence ${sequence}.*Currently deployed version`), { timeout: 45000 }); -
- Engine
- Semgrep · Pattern-based code analysis
- Counts towards
- Vulnerability
- File
- /pkg/store/kotsstore/snapshot_store.go line 47
- Likely real
- Yes, 100% confidence
Variable `wr` is likely modified and later used on error. In some cases this could result in panics due to a nil dereference
wr, err := db.WriteOneParameterized(gorqlite.ParameterizedStatement{ Query: query, Arguments: []interface{}{backupName, snapshotID}, }) if err != nil { return fmt.Errorf("failed to write: %v: %v", err, wr.Err) } -
- Engine
- Semgrep · Pattern-based code analysis
- Counts towards
- Vulnerability
- File
- /pkg/store/kotsstore/preflight_store.go line 38
- Likely real
- Yes, 100% confidence
Variable `rows` is likely modified and later used on error. In some cases this could result in panics due to a nil dereference
rows, err := db.QueryOneParameterized(gorqlite.ParameterizedStatement{ Query: query, Arguments: []interface{}{appID, sequence}, }) if err != nil { return "", fmt.Errorf("failed to query: %v: %v", err, rows.Err) } -
- Engine
- Semgrep · Pattern-based code analysis
- Counts towards
- Vulnerability
- File
- /pkg/store/kotsstore/preflight_store.go line 64
- Likely real
- Yes, 100% confidence
Variable `wr` is likely modified and later used on error. In some cases this could result in panics due to a nil dereference
wr, err := db.WriteOneParameterized(gorqlite.ParameterizedStatement{ Query: query, Arguments: []interface{}{string(results), time.Now().Unix(), appID, sequence}, }) if err != nil { return fmt.Errorf("failed to write: %v: %v", err, wr.Err) } -
- Engine
- Semgrep · Pattern-based code analysis
- Counts towards
- Vulnerability
- File
- /pkg/store/kotsstore/preflight_store.go line 93
- Likely real
- Yes, 100% confidence
Variable `rows` is likely modified and later used on error. In some cases this could result in panics due to a nil dereference
rows, err := db.QueryOneParameterized(gorqlite.ParameterizedStatement{ Query: query, Arguments: []interface{}{appID, sequence}, }) if err != nil { return nil, fmt.Errorf("failed to query: %v: %v", err, rows.Err) } -
- Engine
- Semgrep · Pattern-based code analysis
- Counts towards
- Vulnerability
- File
- /pkg/store/kotsstore/preflight_store.go line 115
- Likely real
- Yes, 100% confidence
Variable `wr` is likely modified and later used on error. In some cases this could result in panics due to a nil dereference
wr, err := db.WriteOneParameterized(gorqlite.ParameterizedStatement{ Query: query, Arguments: []interface{}{appID, sequence}, }) if err != nil { return fmt.Errorf("failed to write: %v: %v", err, wr.Err) } -
- Engine
- Semgrep · Pattern-based code analysis
- Counts towards
- Vulnerability
- File
- /pkg/store/kotsstore/preflight_store.go line 131
- Likely real
- Yes, 100% confidence
Variable `wr` is likely modified and later used on error. In some cases this could result in panics due to a nil dereference
wr, err := db.WriteOneParameterized(gorqlite.ParameterizedStatement{ Query: query, Arguments: []interface{}{appID, sequence}, }) if err != nil { return fmt.Errorf("failed to set downstream version ignore rbac errors: %v: %v", err, wr.Err) } -
- Engine
- Semgrep · Pattern-based code analysis
- Counts towards
- Vulnerability
- File
- /pkg/store/kotsstore/prometheus_store.go line 14
- Likely real
- Yes, 100% confidence
Variable `rows` is likely modified and later used on error. In some cases this could result in panics due to a nil dereference
rows, err := db.QueryOneParameterized(gorqlite.ParameterizedStatement{ Query: query, Arguments: []interface{}{"PROMETHEUS_ADDRESS"}, }) if err != nil { return "", fmt.Errorf("failed to query: %v: %v", err, rows.Err) } -
- Engine
- Semgrep · Pattern-based code analysis
- Counts towards
- Vulnerability
- File
- /pkg/store/kotsstore/prometheus_store.go line 37
- Likely real
- Yes, 100% confidence
Variable `wr` is likely modified and later used on error. In some cases this could result in panics due to a nil dereference
wr, err := db.WriteOneParameterized(gorqlite.ParameterizedStatement{ Query: query, Arguments: []interface{}{"PROMETHEUS_ADDRESS", address}, }) if err != nil { return fmt.Errorf("failed to write: %v: %v", err, wr.Err) } -
- Engine
- Semgrep · Pattern-based code analysis
- Counts towards
- Vulnerability
- File
- /pkg/store/kotsstore/registry_store.go line 19
- Likely real
- Yes, 100% confidence
Variable `rows` is likely modified and later used on error. In some cases this could result in panics due to a nil dereference
rows, err := db.QueryOneParameterized(gorqlite.ParameterizedStatement{ Query: query, Arguments: []interface{}{appID}, }) if err != nil { return registrytypes.RegistrySettings{}, fmt.Errorf("failed to query: %v: %v", err, rows.Err) } -
- Engine
- Semgrep · Pattern-based code analysis
- Counts towards
- Vulnerability
- File
- /pkg/store/kotsstore/registry_store.go line 75
- Likely real
- Yes, 100% confidence
Variable `wr` is likely modified and later used on error. In some cases this could result in panics due to a nil dereference
wr, err := db.WriteOneParameterized(gorqlite.ParameterizedStatement{ Query: query, Arguments: []interface{}{hostname, username, namespace, isReadOnly, appID}, }) if err != nil { return fmt.Errorf("failed to update registry settings: %v: %v", err, wr.Err) } -
- Engine
- Semgrep · Pattern-based code analysis
- Counts towards
- Vulnerability
- File
- /pkg/store/kotsstore/registry_store.go line 86
- Likely real
- Yes, 100% confidence
Variable `wr` is likely modified and later used on error. In some cases this could result in panics due to a nil dereference
wr, err := db.WriteOneParameterized(gorqlite.ParameterizedStatement{ Query: query, Arguments: []interface{}{hostname, username, passwordEnc, namespace, isReadOnly, appID}, }) if err != nil { return fmt.Errorf("failed to update registry settings: %v: %v", err, wr.Err) } -
- Engine
- Semgrep · Pattern-based code analysis
- Counts towards
- Vulnerability
- File
- /pkg/store/kotsstore/registry_store.go line 101
- Likely real
- Yes, 100% confidence
Variable `rows` is likely modified and later used on error. In some cases this could result in panics due to a nil dereference
rows, err := db.QueryOneParameterized(gorqlite.ParameterizedStatement{ Query: query, Arguments: []interface{}{hostname}, }) if err != nil { return nil, fmt.Errorf("failed to query: %v: %v", err, rows.Err) } -
- Engine
- Semgrep · Pattern-based code analysis
- Counts towards
- Vulnerability
- File
- /pkg/store/kotsstore/session_store.go line 44
- Likely real
- Yes, 100% confidence
Variable `rows` is likely modified and later used on error. In some cases this could result in panics due to a nil dereference
rows, err := db.QueryOne(query) if err != nil { return fmt.Errorf("failed to query: %v: %v", err, rows.Err) } -
- Engine
- Semgrep · Pattern-based code analysis
- Counts towards
- Vulnerability
- File
- /pkg/store/kotsstore/session_store.go line 100
- Likely real
- Yes, 100% confidence
Variable `wr` is likely modified and later used on error. In some cases this could result in panics due to a nil dereference
if wr, err := db.WriteOne(query); err != nil { return fmt.Errorf("failed to delete sessions from db: %v: %v", err, wr.Err) } -
- Engine
- Semgrep · Pattern-based code analysis
- Counts towards
- Vulnerability
- File
- /pkg/store/kotsstore/snapshot_store.go line 21
- Likely real
- Yes, 100% confidence
Variable `rows` is likely modified and later used on error. In some cases this could result in panics due to a nil dereference
rows, err := db.QueryOneParameterized(gorqlite.ParameterizedStatement{ Query: query, Arguments: []interface{}{appID}, }) if err != nil { return nil, fmt.Errorf("failed to query: %v: %v", err, rows.Err) } -
- Engine
- Semgrep · Pattern-based code analysis
- Counts towards
- Vulnerability
- File
- /pkg/store/kotsstore/license_store.go line 53
- Likely real
- Yes, 100% confidence
Variable `rows` is likely modified and later used on error. In some cases this could result in panics due to a nil dereference
rows, err := db.QueryOneParameterized(gorqlite.ParameterizedStatement{ Query: query, Arguments: []interface{}{appID, sequence}, }) if err != nil { return nil, fmt.Errorf("failed to query: %v: %v", err, rows.Err) } -
- Engine
- Semgrep · Pattern-based code analysis
- Counts towards
- Vulnerability
- File
- /pkg/store/kotsstore/preflight_store.go line 20
- Likely real
- Yes, 100% confidence
Variable `wr` is likely modified and later used on error. In some cases this could result in panics due to a nil dereference
wr, err := db.WriteOneParameterized(gorqlite.ParameterizedStatement{ Query: query, Arguments: []interface{}{progress, appID, sequence}, }) if err != nil { return fmt.Errorf("failed to write: %v: %v", err, wr.Err) } -
- Engine
- Semgrep · Pattern-based code analysis
- Counts towards
- Vulnerability
- File
- /pkg/store/kotsstore/migrations.go line 489
- Likely real
- Yes, 100% confidence
Variable `wr` is likely modified and later used on error. In some cases this could result in panics due to a nil dereference
wr, err := db.WriteOne(query) if err != nil { return fmt.Errorf("failed to set preflight_skipped: %v: %v", err, wr.Err) } -
- Engine
- Semgrep · Pattern-based code analysis
- Counts towards
- Vulnerability
- File
- /pkg/store/kotsstore/migrations.go line 467
- Likely real
- Yes, 100% confidence
Variable `wr` is likely modified and later used on error. In some cases this could result in panics due to a nil dereference
wr, err := db.WriteOneParameterized(gorqlite.ParameterizedStatement{ Query: query, Arguments: []interface{}{spec, version.appID, version.sequence}, }) if err != nil { return fmt.Errorf("failed to set app_spec: %v: %v", err, wr.Err) } -
- Engine
- Semgrep · Pattern-based code analysis
- Counts towards
- Vulnerability
- File
- /pkg/store/kotsstore/migrations.go line 417
- Likely real
- Yes, 100% confidence
Variable `rows` is likely modified and later used on error. In some cases this could result in panics due to a nil dereference
rows, err := db.QueryOne(query) if err != nil { return fmt.Errorf("failed to query: %v: %v", err, rows.Err) } -
- Engine
- Semgrep · Pattern-based code analysis
- Counts towards
- Vulnerability
- File
- /pkg/store/kotsstore/migrations.go line 395
- Likely real
- Yes, 100% confidence
Variable `wr` is likely modified and later used on error. In some cases this could result in panics due to a nil dereference
wr, err := db.WriteOneParameterized(gorqlite.ParameterizedStatement{ Query: query, Arguments: []interface{}{spec, version.appID, version.sequence}, }) if err != nil { return fmt.Errorf("failed to set analyzer_spec: %v: %v", err, wr.Err) } -
- Engine
- Semgrep · Pattern-based code analysis
- Counts towards
- Vulnerability
- File
- /pkg/store/kotsstore/migrations.go line 345
- Likely real
- Yes, 100% confidence
Variable `rows` is likely modified and later used on error. In some cases this could result in panics due to a nil dereference
rows, err := db.QueryOne(query) if err != nil { return fmt.Errorf("failed to query: %v: %v", err, rows.Err) } -
- Engine
- Semgrep · Pattern-based code analysis
- Counts towards
- Vulnerability
- File
- /pkg/store/kotsstore/migrations.go line 323
- Likely real
- Yes, 100% confidence
Variable `wr` is likely modified and later used on error. In some cases this could result in panics due to a nil dereference
wr, err := db.WriteOneParameterized(gorqlite.ParameterizedStatement{ Query: query, Arguments: []interface{}{spec, version.appID, version.sequence}, }) if err != nil { return fmt.Errorf("failed to set preflight_spec: %v: %v", err, wr.Err) } -
- Engine
- Semgrep · Pattern-based code analysis
- Counts towards
- Vulnerability
- File
- /pkg/store/kotsstore/migrations.go line 273
- Likely real
- Yes, 100% confidence
Variable `rows` is likely modified and later used on error. In some cases this could result in panics due to a nil dereference
rows, err := db.QueryOne(query) if err != nil { return fmt.Errorf("failed to query: %v: %v", err, rows.Err) } -
- Engine
- Semgrep · Pattern-based code analysis
- Counts towards
- Vulnerability
- File
- /pkg/store/kotsstore/migrations.go line 251
- Likely real
- Yes, 100% confidence
Variable `wr` is likely modified and later used on error. In some cases this could result in panics due to a nil dereference
wr, err := db.WriteOneParameterized(gorqlite.ParameterizedStatement{ Query: query, Arguments: []interface{}{spec, version.appID, version.sequence}, }) if err != nil { return fmt.Errorf("failed to set supportbundle_spec: %v: %v", err, wr.Err) } -
- Engine
- Semgrep · Pattern-based code analysis
- Counts towards
- Vulnerability
- File
- /pkg/store/kotsstore/migrations.go line 201
- Likely real
- Yes, 100% confidence
Variable `rows` is likely modified and later used on error. In some cases this could result in panics due to a nil dereference
rows, err := db.QueryOne(query) if err != nil { return fmt.Errorf("failed to query: %v: %v", err, rows.Err) } -
- Engine
- Semgrep · Pattern-based code analysis
- Counts towards
- Vulnerability
- File
- /pkg/store/kotsstore/migrations.go line 179
- Likely real
- Yes, 100% confidence
Variable `wr` is likely modified and later used on error. In some cases this could result in panics due to a nil dereference
wr, err := db.WriteOneParameterized(gorqlite.ParameterizedStatement{ Query: query, Arguments: []interface{}{spec, version.appID, version.sequence}, }) if err != nil { return fmt.Errorf("failed to set kots_installation_spec: %v: %v", err, wr.Err) } -
- Engine
- Semgrep · Pattern-based code analysis
- Counts towards
- Vulnerability
- File
- /pkg/store/kotsstore/migrations.go line 129
- Likely real
- Yes, 100% confidence
Variable `rows` is likely modified and later used on error. In some cases this could result in panics due to a nil dereference
rows, err := db.QueryOne(query) if err != nil { return fmt.Errorf("failed to query: %v: %v", err, rows.Err) } -
- Engine
- Semgrep · Pattern-based code analysis
- Counts towards
- Vulnerability
- File
- /pkg/store/kotsstore/migrations.go line 107
- Likely real
- Yes, 100% confidence
Variable `wr` is likely modified and later used on error. In some cases this could result in panics due to a nil dereference
wr, err := db.WriteOneParameterized(gorqlite.ParameterizedStatement{ Query: query, Arguments: []interface{}{spec, version.appID, version.sequence}, }) if err != nil { return fmt.Errorf("failed to set kots_app_spec: %v: %v", err, wr.Err) } -
- Engine
- Semgrep · Pattern-based code analysis
- Counts towards
- Vulnerability
- File
- /pkg/store/kotsstore/migrations.go line 57
- Likely real
- Yes, 100% confidence
Variable `rows` is likely modified and later used on error. In some cases this could result in panics due to a nil dereference
rows, err := db.QueryOne(query) if err != nil { return fmt.Errorf("failed to query: %v: %v", err, rows.Err) } -
- Engine
- Semgrep · Pattern-based code analysis
- Counts towards
- Vulnerability
- File
- /pkg/store/kotsstore/license_store.go line 226
- Likely real
- Yes, 100% confidence
Variable `wr` is likely modified and later used on error. In some cases this could result in panics due to a nil dereference
wr, err := db.WriteOneParameterized(gorqlite.ParameterizedStatement{ Query: query, Arguments: []interface{}{time.Now().Unix(), appID}, }) if err != nil { return fmt.Errorf("update app %q license sync time: %v: %v", appID, err, wr.Err) } -
- Engine
- Semgrep · Pattern-based code analysis
- Counts towards
- Vulnerability
- File
- /pkg/store/kotsstore/license_store.go line 87
- Likely real
- Yes, 100% confidence
Variable `rows` is likely modified and later used on error. In some cases this could result in panics due to a nil dereference
rows, err := db.QueryOne(query) if err != nil { return nil, fmt.Errorf("failed to query: %v: %v", err, rows.Err) } -
- Engine
- Semgrep · Pattern-based code analysis
- Counts towards
- Vulnerability
- File
- /pkg/store/kotsstore/version_store.go line 975
- Likely real
- Yes, 100% confidence
Variable `rows` is likely modified and later used on error. In some cases this could result in panics due to a nil dereference
rows, err := db.QueryOneParameterized(gorqlite.ParameterizedStatement{ Query: query, Arguments: []interface{}{appID, channelID, appID, channelID}, }) if err != nil { return "", fmt.Errorf("failed to query: %v: %v", err, rows.Err) } -
- Engine
- Semgrep · Pattern-based code analysis
- Counts towards
- Vulnerability
- File
- /pkg/store/kotsstore/version_store.go line 45
- Likely real
- Yes, 100% confidence
Variable `rows` is likely modified and later used on error. In some cases this could result in panics due to a nil dereference
rows, err := db.QueryOneParameterized(gorqlite.ParameterizedStatement{ Query: query, Arguments: []interface{}{appID, sequence}, }) if err != nil { return false, fmt.Errorf("failed to query: %v: %v", err, rows.Err) } -
- Engine
- Semgrep · Pattern-based code analysis
- Counts towards
- Vulnerability
- File
- /pkg/store/kotsstore/version_store.go line 76
- Likely real
- Yes, 100% confidence
Variable `rows` is likely modified and later used on error. In some cases this could result in panics due to a nil dereference
rows, err := db.QueryOneParameterized(gorqlite.ParameterizedStatement{ Query: query, Arguments: []interface{}{appID, sequence}, }) if err != nil { return false, fmt.Errorf("failed to query: %v: %v", err, rows.Err) } -
- Engine
- Semgrep · Pattern-based code analysis
- Counts towards
- Vulnerability
- File
- /pkg/store/kotsstore/version_store.go line 102
- Likely real
- Yes, 100% confidence
Variable `rows` is likely modified and later used on error. In some cases this could result in panics due to a nil dereference
rows, err := db.QueryOneParameterized(gorqlite.ParameterizedStatement{ Query: query, Arguments: []interface{}{a.ID, sequence}, }) if err != nil { return false, fmt.Errorf("failed to query: %v: %v", err, rows.Err) } -
- Engine
- Semgrep · Pattern-based code analysis
- Counts towards
- Vulnerability
- File
- /pkg/store/kotsstore/version_store.go line 184
- Likely real
- Yes, 100% confidence
Variable `rows` is likely modified and later used on error. In some cases this could result in panics due to a nil dereference
rows, err := db.QueryOneParameterized(gorqlite.ParameterizedStatement{ Query: query, Arguments: []interface{}{appID, sequence}, }) if err != nil { return "", fmt.Errorf("failed to query: %v: %v", err, rows.Err) } -
- Engine
- Semgrep · Pattern-based code analysis
- Counts towards
- Vulnerability
- File
- /pkg/store/kotsstore/version_store.go line 215
- Likely real
- Yes, 100% confidence
Variable `rows` is likely modified and later used on error. In some cases this could result in panics due to a nil dereference
rows, err := db.QueryOneParameterized(gorqlite.ParameterizedStatement{ Query: query, Arguments: []interface{}{appID, sequence}, }) if err != nil { return nil, fmt.Errorf("failed to query: %v: %v", err, rows.Err) } -
- Engine
- Semgrep · Pattern-based code analysis
- Counts towards
- Vulnerability
- File
- /pkg/store/kotsstore/version_store.go line 800
- Likely real
- Yes, 100% confidence
Variable `rows` is likely modified and later used on error. In some cases this could result in panics due to a nil dereference
rows, err := db.QueryOneParameterized(gorqlite.ParameterizedStatement{ Query: query, Arguments: []interface{}{appID, sequence}, }) if err != nil { return nil, fmt.Errorf("failed to query: %v: %v", err, rows.Err) } -
- Engine
- Semgrep · Pattern-based code analysis
- Counts towards
- Vulnerability
- File
- /pkg/store/kotsstore/version_store.go line 932
- Likely real
- Yes, 100% confidence
Variable `wr` is likely modified and later used on error. In some cases this could result in panics due to a nil dereference
wr, err := db.WriteOneParameterized(gorqlite.ParameterizedStatement{ Query: `update app_downstream_version set diff_summary = ?, diff_summary_error = ? where app_id = ? AND sequence = ?`, Arguments: []interface{}{diffSummary, diffSummaryError, appID, nextSequence}, }) if err != nil { return fmt.Errorf("failed to write: %v: %v", err, wr.Err) } -
- Engine
- Semgrep · Pattern-based code analysis
- Counts towards
- Vulnerability
- File
- /pkg/store/kotsstore/version_store.go line 946
- Likely real
- Yes, 100% confidence
Variable `rows` is likely modified and later used on error. In some cases this could result in panics due to a nil dereference
rows, err := db.QueryOneParameterized(gorqlite.ParameterizedStatement{ Query: `select max(sequence) from app_version where app_id = ?`, Arguments: []interface{}{appID}, }) if err != nil { return 0, fmt.Errorf("failed to query: %v: %v", err, rows.Err) } -
- Engine
- Semgrep · Pattern-based code analysis
- Counts towards
- Vulnerability
- File
- /pkg/store/kotsstore/user_store.go line 237
- Likely real
- Yes, 100% confidence
Variable `wr` is likely modified and later used on error. In some cases this could result in panics due to a nil dereference
wr, err = db.WriteOneParameterized(gorqlite.ParameterizedStatement{ Query: `insert into kotsadm_params (key, value) values (?, ?)`, Arguments: []interface{}{"failed.login.count", "0"}, }) if err != nil { return fmt.Errorf("failed to reset failed login count: %v: %v", err, wr.Err) } -
- Engine
- Semgrep · Pattern-based code analysis
- Counts towards
- Vulnerability
- File
- /pkg/store/kotsstore/version_store.go line 1035
- Likely real
- Yes, 100% confidence
Variable `rows` is likely modified and later used on error. In some cases this could result in panics due to a nil dereference
rows, err := db.QueryOneParameterized(gorqlite.ParameterizedStatement{ Query: query, Arguments: []interface{}{appID, sequence}, }) if err != nil { return false, fmt.Errorf("failed to query: %v: %v", err, rows.Err) } -
- Engine
- Semgrep · Pattern-based code analysis
- Counts towards
- Vulnerability
- File
- /pkg/tasks/tasks.go line 89
- Likely real
- Yes, 100% confidence
Variable `wr` is likely modified and later used on error. In some cases this could result in panics due to a nil dereference
wr, err := db.WriteOneParameterized(gorqlite.ParameterizedStatement{ Query: query, Arguments: []interface{}{id, time.Now().Unix(), message, status}, }) if err != nil { return fmt.Errorf("failed to write: %v: %v", err, wr.Err) } -
- Engine
- Semgrep · Pattern-based code analysis
- Counts towards
- Vulnerability
- File
- /pkg/tasks/tasks.go line 104
- Likely real
- Yes, 100% confidence
Variable `wr` is likely modified and later used on error. In some cases this could result in panics due to a nil dereference
wr, err := db.WriteOneParameterized(gorqlite.ParameterizedStatement{ Query: query, Arguments: []interface{}{time.Now().Unix(), id}, }) if err != nil { return fmt.Errorf("failed to write: %v: %v", err, wr.Err) } -
- Engine
- Semgrep · Pattern-based code analysis
- Counts towards
- Vulnerability
- File
- /pkg/tasks/tasks.go line 119
- Likely real
- Yes, 100% confidence
Variable `wr` is likely modified and later used on error. In some cases this could result in panics due to a nil dereference
wr, err := db.WriteOneParameterized(gorqlite.ParameterizedStatement{ Query: query, Arguments: []interface{}{id}, }) if err != nil { return fmt.Errorf("failed to write: %v: %v", err, wr.Err) } -
- Engine
- Semgrep · Pattern-based code analysis
- Counts towards
- Vulnerability
- File
- /pkg/tasks/tasks.go line 135
- Likely real
- Yes, 100% confidence
Variable `rows` is likely modified and later used on error. In some cases this could result in panics due to a nil dereference
rows, err := db.QueryOneParameterized(gorqlite.ParameterizedStatement{ Query: query, Arguments: []interface{}{id}, }) if err != nil { return "", "", fmt.Errorf("failed to query app: %v: %v", err, rows.Err) } -
- Engine
- Semgrep · Pattern-based code analysis
- Counts towards
- Vulnerability
- File
- /pkg/version/version.go line 68
- Likely real
- Yes, 100% confidence
Variable `rows` is likely modified and later used on error. In some cases this could result in panics due to a nil dereference
rows, err := db.QueryOneParameterized(gorqlite.ParameterizedStatement{ Query: query, Arguments: []interface{}{appID, sequence}, }) if err != nil { return nil, fmt.Errorf("failed to query: %v: %v", err, rows.Err) } -
- Engine
- Semgrep · Pattern-based code analysis
- Counts towards
- Vulnerability
- File
- /pkg/store/kotsstore/downstream_store.go line 568
- Likely real
- Yes, 100% confidence
Variable `rows` is likely modified and later used on error. In some cases this could result in panics due to a nil dereference
rows, err := db.QueryOneParameterized(gorqlite.ParameterizedStatement{ Query: query, Arguments: []interface{}{appID, clusterID}, }) if err != nil { return fmt.Errorf("failed to query: %v: %v", err, rows.Err) } -
- Engine
- Semgrep · Pattern-based code analysis
- Counts towards
- Vulnerability
- File
- /pkg/store/kotsstore/supportbundle_store.go line 187
- Likely real
- Yes, 100% confidence
Variable `wr` is likely modified and later used on error. In some cases this could result in panics due to a nil dereference
if wr, err := db.WriteOne(query); err != nil { return fmt.Errorf("failed to delete support bundles from db: %v: %v", err, wr.Err) } -
- Engine
- Semgrep · Pattern-based code analysis
- Counts towards
- Vulnerability
- File
- /pkg/store/kotsstore/snapshot_store.go line 90
- Likely real
- Yes, 100% confidence
Variable `wr` is likely modified and later used on error. In some cases this could result in panics due to a nil dereference
wr, err := db.WriteOneParameterized(gorqlite.ParameterizedStatement{ Query: query, Arguments: []interface{}{id, appID, timestamp.Unix()}, }) if err != nil { return fmt.Errorf("failed to write: %v: %v", err, wr.Err) } -
- Engine
- Semgrep · Pattern-based code analysis
- Counts towards
- Vulnerability
- File
- /pkg/store/kotsstore/snapshot_store.go line 107
- Likely real
- Yes, 100% confidence
Variable `rows` is likely modified and later used on error. In some cases this could result in panics due to a nil dereference
rows, err := db.QueryOneParameterized(gorqlite.ParameterizedStatement{ Query: query, Arguments: []interface{}{clusterID}, }) if err != nil { return nil, fmt.Errorf("failed to query: %v: %v", err, rows.Err) } -
- Engine
- Semgrep · Pattern-based code analysis
- Counts towards
- Vulnerability
- File
- /pkg/store/kotsstore/snapshot_store.go line 133
- Likely real
- Yes, 100% confidence
Variable `wr` is likely modified and later used on error. In some cases this could result in panics due to a nil dereference
wr, err := db.WriteOneParameterized(gorqlite.ParameterizedStatement{ Query: query, Arguments: []interface{}{backupName, snapshotID}, }) if err != nil { return fmt.Errorf("failed to write: %v: %v", err, wr.Err) } -
- Engine
- Semgrep · Pattern-based code analysis
- Counts towards
- Vulnerability
- File
- /pkg/store/kotsstore/snapshot_store.go line 149
- Likely real
- Yes, 100% confidence
Variable `wr` is likely modified and later used on error. In some cases this could result in panics due to a nil dereference
wr, err := db.WriteOneParameterized(gorqlite.ParameterizedStatement{ Query: query, Arguments: []interface{}{clusterID}, }) if err != nil { return fmt.Errorf("failed to write: %v: %v", err, wr.Err) } -
- Engine
- Semgrep · Pattern-based code analysis
- Counts towards
- Vulnerability
- File
- /pkg/store/kotsstore/snapshot_store.go line 176
- Likely real
- Yes, 100% confidence
Variable `wr` is likely modified and later used on error. In some cases this could result in panics due to a nil dereference
wr, err := db.WriteOneParameterized(gorqlite.ParameterizedStatement{ Query: query, Arguments: []interface{}{id, clusterID, timestamp.Unix()}, }) if err != nil { return fmt.Errorf("failed to write: %v: %v", err, wr.Err) } -
- Engine
- Semgrep · Pattern-based code analysis
- Counts towards
- Vulnerability
- File
- /pkg/store/kotsstore/supportbundle_store.go line 43
- Likely real
- Yes, 100% confidence
Variable `rows` is likely modified and later used on error. In some cases this could result in panics due to a nil dereference
rows, err := db.QueryOne(query) if err != nil { return fmt.Errorf("failed to query: %v: %v", err, rows.Err) } -
- Engine
- Semgrep · Pattern-based code analysis
- Counts towards
- Vulnerability
- File
- /pkg/store/kotsstore/supportbundle_store.go line 89
- Likely real
- Yes, 100% confidence
Variable `rows` is likely modified and later used on error. In some cases this could result in panics due to a nil dereference
rows, err := db.QueryOneParameterized(gorqlite.ParameterizedStatement{ Query: query, Arguments: []interface{}{supportBundle.ID}, }) if err != nil { return fmt.Errorf("failed to query: %v: %v", err, rows.Err) } -
- Engine
- Semgrep · Pattern-based code analysis
- Counts towards
- Vulnerability
- File
- /pkg/store/kotsstore/supportbundle_store.go line 126
- Likely real
- Yes, 100% confidence
Variable `rows` is likely modified and later used on error. In some cases this could result in panics due to a nil dereference
rows, err = db.QueryOneParameterized(gorqlite.ParameterizedStatement{ Query: query, Arguments: []interface{}{supportBundle.ID}, }) if err != nil { return fmt.Errorf("failed to query: %v: %v", err, rows.Err) } -
- Engine
- Semgrep · Pattern-based code analysis
- Counts towards
- Vulnerability
- File
- /pkg/store/kotsstore/snapshot_store.go line 63
- Likely real
- Yes, 100% confidence
Variable `wr` is likely modified and later used on error. In some cases this could result in panics due to a nil dereference
wr, err := db.WriteOneParameterized(gorqlite.ParameterizedStatement{ Query: query, Arguments: []interface{}{appID}, }) if err != nil { return fmt.Errorf("failed to write: %v: %v", err, wr.Err) } -
- Engine
- Semgrep · Pattern-based code analysis
- Counts towards
- Vulnerability
- File
- /pkg/store/kotsstore/supportbundle_store.go line 191
- Likely real
- Yes, 100% confidence
Variable `wr` is likely modified and later used on error. In some cases this could result in panics due to a nil dereference
if wr, err := db.WriteOne(query); err != nil { return fmt.Errorf("failed to delete support bundle analysises from db: %v: %v", err, wr.Err) } -
- Engine
- Semgrep · Pattern-based code analysis
- Counts towards
- Vulnerability
- File
- /pkg/store/kotsstore/user_store.go line 63
- Likely real
- Yes, 100% confidence
Variable `rows` is likely modified and later used on error. In some cases this could result in panics due to a nil dereference
rows, err := db.QueryOneParameterized(gorqlite.ParameterizedStatement{ Query: query, Arguments: []interface{}{"failed.login.count"}, }) if err != nil { return nil, fmt.Errorf("failed to query login count: %v: %v", err, rows.Err) } -
- Engine
- Semgrep · Pattern-based code analysis
- Counts towards
- Vulnerability
- File
- /pkg/store/kotsstore/user_store.go line 88
- Likely real
- Yes, 100% confidence
Variable `rows` is likely modified and later used on error. In some cases this could result in panics due to a nil dereference
rows, err = db.QueryOneParameterized(gorqlite.ParameterizedStatement{ Query: query, Arguments: []interface{}{"password.bcrypt"}, }) if err != nil { return nil, fmt.Errorf("failed to query password: %v: %v", err, rows.Err) } -
- Engine
- Semgrep · Pattern-based code analysis
- Counts towards
- Vulnerability
- File
- /pkg/store/kotsstore/user_store.go line 149
- Likely real
- Yes, 100% confidence
Variable `rows` is likely modified and later used on error. In some cases this could result in panics due to a nil dereference
rows, err := db.QueryOneParameterized(gorqlite.ParameterizedStatement{ Query: query, Arguments: []interface{}{"failed.login.count"}, }) if err != nil { return fmt.Errorf("failed to query: %v: %v", err, rows.Err) } -
- Engine
- Semgrep · Pattern-based code analysis
- Counts towards
- Vulnerability
- File
- /pkg/store/kotsstore/user_store.go line 159
- Likely real
- Yes, 100% confidence
Variable `wr` is likely modified and later used on error. In some cases this could result in panics due to a nil dereference
wr, err := db.WriteOneParameterized(gorqlite.ParameterizedStatement{ Query: query, Arguments: []interface{}{"failed.login.count", "1"}, }) if err != nil { return fmt.Errorf("failed to insert failed login count: %v: %v", err, wr.Err) } -
- Engine
- Semgrep · Pattern-based code analysis
- Counts towards
- Vulnerability
- File
- /pkg/store/kotsstore/user_store.go line 180
- Likely real
- Yes, 100% confidence
Variable `wr` is likely modified and later used on error. In some cases this could result in panics due to a nil dereference
wr, err := db.WriteOneParameterized(gorqlite.ParameterizedStatement{ Query: `update kotsadm_params set value = ? where key = ?`, Arguments: []interface{}{strconv.Itoa(i), "failed.login.count"}, }) if err != nil { return fmt.Errorf("failed to update failed login count: %v: %v", err, wr.Err) } -
- Engine
- Semgrep · Pattern-based code analysis
- Counts towards
- Vulnerability
- File
- /pkg/store/kotsstore/user_store.go line 229
- Likely real
- Yes, 100% confidence
Variable `wr` is likely modified and later used on error. In some cases this could result in panics due to a nil dereference
wr, err := db.WriteOneParameterized(gorqlite.ParameterizedStatement{ Query: `delete from kotsadm_params where key = ?`, Arguments: []interface{}{"failed.login.count"}, }) if err != nil { return fmt.Errorf("failed to delete failed login count: %v: %v", err, wr.Err) } -
- Engine
- Semgrep · Pattern-based code analysis
- Counts towards
- Vulnerability
- File
- /pkg/store/kotsstore/app_store.go line 407
- Likely real
- Yes, 100% confidence
Variable `rows` is likely modified and later used on error. In some cases this could result in panics due to a nil dereference
rows, err := db.QueryOneParameterized(gorqlite.ParameterizedStatement{ Query: query, Arguments: []interface{}{clusterID}, }) if err != nil { return nil, fmt.Errorf("failed to query: %v: %v", err, rows.Err) } -
- Engine
- Semgrep · Pattern-based code analysis
- Counts towards
- Vulnerability
- File
- /pkg/store/kotsstore/app_store.go line 65
- Likely real
- Yes, 100% confidence
Variable `rows` is likely modified and later used on error. In some cases this could result in panics due to a nil dereference
rows, err := db.QueryOne(query) if err != nil { return nil, fmt.Errorf("failed to query: %v: %v", err, rows.Err) } -
- Engine
- Semgrep · Pattern-based code analysis
- Counts towards
- Vulnerability
- File
- /pkg/store/kotsstore/app_store.go line 89
- Likely real
- Yes, 100% confidence
Variable `rows` is likely modified and later used on error. In some cases this could result in panics due to a nil dereference
rows, err := db.QueryOne(query) if err != nil { return nil, fmt.Errorf("failed to query: %v: %v", err, rows.Err) } -
- Engine
- Semgrep · Pattern-based code analysis
- Counts towards
- Vulnerability
- File
- /pkg/store/kotsstore/app_store.go line 113
- Likely real
- Yes, 100% confidence
Variable `rows` is likely modified and later used on error. In some cases this could result in panics due to a nil dereference
rows, err := db.QueryOne(query) if err != nil { return nil, fmt.Errorf("failed to query: %v: %v", err, rows.Err) } -
- Engine
- Semgrep · Pattern-based code analysis
- Counts towards
- Vulnerability
- File
- /pkg/store/kotsstore/app_store.go line 132
- Likely real
- Yes, 100% confidence
Variable `rows` is likely modified and later used on error. In some cases this could result in panics due to a nil dereference
rows, err := db.QueryOneParameterized(gorqlite.ParameterizedStatement{ Query: query, Arguments: []interface{}{slug}, }) if err != nil { return "", fmt.Errorf("failed to query: %v: %v", err, rows.Err) } -
- Engine
- Semgrep · Pattern-based code analysis
- Counts towards
- Vulnerability
- File
- /pkg/store/kotsstore/app_store.go line 154
- Likely real
- Yes, 100% confidence
Variable `rows` is likely modified and later used on error. In some cases this could result in panics due to a nil dereference
rows, err := db.QueryOneParameterized(gorqlite.ParameterizedStatement{ Query: query, Arguments: []interface{}{id}, }) if err != nil { return nil, fmt.Errorf("failed to query app: %v: %v", err, rows.Err) } -
- Engine
- Semgrep · Pattern-based code analysis
- Counts towards
- Vulnerability
- File
- /pkg/store/kotsstore/app_store.go line 222
- Likely real
- Yes, 100% confidence
Variable `rows` is likely modified and later used on error. In some cases this could result in panics due to a nil dereference
rows, err := db.QueryOneParameterized(gorqlite.ParameterizedStatement{ Query: query, Arguments: []interface{}{id, latestSequence}, }) if err != nil { return nil, fmt.Errorf("failed to query app_version: %v: %v", err, rows.Err) } -
- Engine
- Semgrep · Pattern-based code analysis
- Counts towards
- Vulnerability
- File
- /pkg/store/kotsstore/app_store.go line 323
- Likely real
- Yes, 100% confidence
Variable `rows` is likely modified and later used on error. In some cases this could result in panics due to a nil dereference
rows, err := db.QueryOneParameterized(gorqlite.ParameterizedStatement{ Query: query, Arguments: []interface{}{slugProposal}, }) if err != nil { return nil, fmt.Errorf("failed to query app: %v: %v", err, rows.Err) } -
- Engine
- Semgrep · Pattern-based code analysis
- Counts towards
- Vulnerability
- File
- /pkg/store/kotsstore/app_store.go line 364
- Likely real
- Yes, 100% confidence
Variable `wr` is likely modified and later used on error. In some cases this could result in panics due to a nil dereference
wr, err := db.WriteOneParameterized(gorqlite.ParameterizedStatement{ Query: query, Arguments: []interface{}{id, name, "", time.Now().Unix(), slugProposal, upstreamURI, licenseData, true, installState, registryIsReadOnly, selectedChannelID}, }) if err != nil { return nil, fmt.Errorf("failed to insert app: %v: %v", err, wr.Err) } -
- Engine
- Semgrep · Pattern-based code analysis
- Counts towards
- Vulnerability
- File
- /pkg/store/kotsstore/app_store.go line 378
- Likely real
- Yes, 100% confidence
Variable `rows` is likely modified and later used on error. In some cases this could result in panics due to a nil dereference
rows, err := db.QueryOneParameterized(gorqlite.ParameterizedStatement{ Query: query, Arguments: []interface{}{appID}, }) if err != nil { return nil, fmt.Errorf("failed to query: %v: %v", err, rows.Err) } -
- Engine
- Semgrep · Pattern-based code analysis
- Counts towards
- Vulnerability
- File
- /pkg/store/kotsstore/app_store.go line 51
- Likely real
- Yes, 100% confidence
Variable `wr` is likely modified and later used on error. In some cases this could result in panics due to a nil dereference
wr, err := db.WriteOneParameterized(gorqlite.ParameterizedStatement{ Query: query, Arguments: []interface{}{state, appID}, }) if err != nil { return fmt.Errorf("failed to update app install state: %v: %v", err, wr.Err) } -
- Engine
- Semgrep · Pattern-based code analysis
- Counts towards
- Vulnerability
- File
- /pkg/store/kotsstore/app_store.go line 434
- Likely real
- Yes, 100% confidence
Variable `rows` is likely modified and later used on error. In some cases this could result in panics due to a nil dereference
rows, err := db.QueryOneParameterized(gorqlite.ParameterizedStatement{ Query: query, Arguments: []interface{}{clusterID}, }) if err != nil { return nil, fmt.Errorf("failed to query: %v: %v", err, rows.Err) } -
- Engine
- Semgrep · Pattern-based code analysis
- Counts towards
- Vulnerability
- File
- /pkg/store/kotsstore/app_store.go line 484
- Likely real
- Yes, 100% confidence
Variable `wr` is likely modified and later used on error. In some cases this could result in panics due to a nil dereference
wr, err := db.WriteOneParameterized(gorqlite.ParameterizedStatement{ Query: query, Arguments: []interface{}{updateCheckerSpec, appID}, }) if err != nil { return fmt.Errorf("failed to write: %v: %v", err, wr.Err) } -
- Engine
- Semgrep · Pattern-based code analysis
- Counts towards
- Vulnerability
- File
- /pkg/store/kotsstore/app_store.go line 501
- Likely real
- Yes, 100% confidence
Variable `wr` is likely modified and later used on error. In some cases this could result in panics due to a nil dereference
wr, err := db.WriteOneParameterized(gorqlite.ParameterizedStatement{ Query: query, Arguments: []interface{}{autoDeploy, appID}, }) if err != nil { return fmt.Errorf("failed to write: %v: %v", err, wr.Err) } -
- Engine
- Semgrep · Pattern-based code analysis
- Counts towards
- Vulnerability
- File
- /pkg/store/kotsstore/app_store.go line 518
- Likely real
- Yes, 100% confidence
Variable `wr` is likely modified and later used on error. In some cases this could result in panics due to a nil dereference
wr, err := db.WriteOneParameterized(gorqlite.ParameterizedStatement{ Query: query, Arguments: []interface{}{snapshotTTL, appID}, }) if err != nil { return fmt.Errorf("failed to write: %v: %v", err, wr.Err) } -
- Engine
- Semgrep · Pattern-based code analysis
- Counts towards
- Vulnerability
- File
- /pkg/store/kotsstore/app_store.go line 535
- Likely real
- Yes, 100% confidence
Variable `wr` is likely modified and later used on error. In some cases this could result in panics due to a nil dereference
wr, err := db.WriteOneParameterized(gorqlite.ParameterizedStatement{ Query: query, Arguments: []interface{}{snapshotSchedule, appID}, }) if err != nil { return fmt.Errorf("failed to write: %v: %v", err, wr.Err) } -
- Engine
- Semgrep · Pattern-based code analysis
- Counts towards
- Vulnerability
- File
- /pkg/store/kotsstore/app_store.go line 553
- Likely real
- Yes, 100% confidence
Variable `rows` is likely modified and later used on error. In some cases this could result in panics due to a nil dereference
rows, err := db.QueryOneParameterized(gorqlite.ParameterizedStatement{ Query: query, Arguments: []interface{}{appID}, }) if err != nil { return "", nil, fmt.Errorf("failed to query: %v: %v", err, rows.Err) } -
- Engine
- Semgrep · Pattern-based code analysis
- Counts towards
- Vulnerability
- File
- /pkg/store/kotsstore/app_store.go line 607
- Likely real
- Yes, 100% confidence
Variable `wr` is likely modified and later used on error. In some cases this could result in panics due to a nil dereference
wr, err := db.WriteOneParameterized(gorqlite.ParameterizedStatement{ Query: query, Arguments: []interface{}{instanceID, string(lineageJSON), appID}, }) if err != nil { return fmt.Errorf("failed to write: %v: %v", err, wr.Err) } -
- Engine
- Semgrep · Pattern-based code analysis
- Counts towards
- Vulnerability
- File
- /pkg/store/kotsstore/app_store.go line 686
- Likely real
- Yes, 100% confidence
Variable `wr` is likely modified and later used on error. In some cases this could result in panics due to a nil dereference
wr, err := db.WriteOneParameterized(gorqlite.ParameterizedStatement{ Query: query, Arguments: []interface{}{channelChanged, appID}, }) if err != nil { return fmt.Errorf("failed to update app channel changed flag: %v: %v", err, wr.Err) } -
- Engine
- Semgrep · Pattern-based code analysis
- Counts towards
- Vulnerability
- File
- /pkg/store/kotsstore/app_store.go line 700
- Likely real
- Yes, 100% confidence
Variable `rows` is likely modified and later used on error. In some cases this could result in panics due to a nil dereference
rows, err := db.QueryOneParameterized(gorqlite.ParameterizedStatement{ Query: query, Arguments: []interface{}{appID}, }) if err != nil { return "", fmt.Errorf("failed to query: %v: %v", err, rows.Err) } -
- Engine
- Semgrep · Pattern-based code analysis
- Counts towards
- Vulnerability
- File
- /pkg/filestore/rqlite_store.go line 69
- Likely real
- Yes, 100% confidence
Variable `rows` is likely modified and later used on error. In some cases this could result in panics due to a nil dereference
rows, err := db.QueryOneParameterized(gorqlite.ParameterizedStatement{ Query: query, Arguments: []interface{}{path}, }) if err != nil { return "", fmt.Errorf("failed to read: %v: %v", err, rows.Err) } -
- Engine
- Semgrep · Pattern-based code analysis
- Counts towards
- Vulnerability
- File
- /pkg/app/app.go line 16
- Likely real
- Yes, 100% confidence
Variable `wr` is likely modified and later used on error. In some cases this could result in panics due to a nil dereference
wr, err := db.WriteOneParameterized(gorqlite.ParameterizedStatement{ Query: query, Arguments: []interface{}{t.Unix(), appID}, }) if err != nil { return fmt.Errorf("failed to update last_update_check_at: %v: %v", err, wr.Err) } -
- Engine
- Semgrep · Pattern-based code analysis
- Counts towards
- Vulnerability
- File
- /pkg/app/app.go line 30
- Likely real
- Yes, 100% confidence
Variable `wr` is likely modified and later used on error. In some cases this could result in panics due to a nil dereference
wr, err := db.WriteOneParameterized(gorqlite.ParameterizedStatement{ Query: query, Arguments: []interface{}{snapshotName, appID}, }) if err != nil { return fmt.Errorf("failed to update restore_in_progress_name: %v: %v", err, wr.Err) } -
- Engine
- Semgrep · Pattern-based code analysis
- Counts towards
- Vulnerability
- File
- /pkg/app/app.go line 44
- Likely real
- Yes, 100% confidence
Variable `wr` is likely modified and later used on error. In some cases this could result in panics due to a nil dereference
wr, err := db.WriteOneParameterized(gorqlite.ParameterizedStatement{ Query: query, Arguments: []interface{}{appID}, }) if err != nil { return fmt.Errorf("failed to write: %v: %v", err, wr.Err) } -
- Engine
- Semgrep · Pattern-based code analysis
- Counts towards
- Vulnerability
- File
- /pkg/app/app.go line 58
- Likely real
- Yes, 100% confidence
Variable `wr` is likely modified and later used on error. In some cases this could result in panics due to a nil dereference
wr, err := db.WriteOneParameterized(gorqlite.ParameterizedStatement{ Query: query, Arguments: []interface{}{undeployStatus, appID}, }) if err != nil { return fmt.Errorf("failed to write: %v: %v", err, wr.Err) } -
- Engine
- Semgrep · Pattern-based code analysis
- Counts towards
- Vulnerability
- File
- /pkg/base/helm.go line 462
- Likely real
- Yes, 100% confidence
Variable `tmpFile` is likely modified and later used on error. In some cases this could result in panics due to a nil dereference
tmpFile, err := os.CreateTemp(chartsPath, name) if err != nil { return nil, errors.Wrapf(err, "failed to write temp file %v", tmpFile.Name()) } -
- Engine
- Semgrep · Pattern-based code analysis
- Counts towards
- Vulnerability
- File
- /pkg/filestore/migrate.go line 98
- Likely real
- Yes, 100% confidence
Variable `wr` is likely modified and later used on error. In some cases this could result in panics due to a nil dereference
wr, err := rqliteDB.WriteOneParameterized(gorqlite.ParameterizedStatement{ Query: query, Arguments: []interface{}{RQLITE_S3_MIGRATION_SUCCESS_KEY, RQLITE_MIGRATION_SUCCESS_VALUE}, }) if err != nil { return fmt.Errorf("failed to mark migration as successful: %v: %v", err, wr.Err) } -
- Engine
- Semgrep · Pattern-based code analysis
- Counts towards
- Vulnerability
- File
- /pkg/filestore/migrate.go line 170
- Likely real
- Yes, 100% confidence
Variable `wr` is likely modified and later used on error. In some cases this could result in panics due to a nil dereference
wr, err := rqliteDB.WriteOneParameterized(gorqlite.ParameterizedStatement{ Query: query, Arguments: []interface{}{RQLITE_BLOB_MIGRATION_SUCCESS_KEY, RQLITE_MIGRATION_SUCCESS_VALUE}, }) if err != nil { return fmt.Errorf("failed to mark migration as successful: %v: %v", err, wr.Err) } -
- Engine
- Semgrep · Pattern-based code analysis
- Counts towards
- Vulnerability
- File
- /pkg/filestore/migrate.go line 184
- Likely real
- Yes, 100% confidence
Variable `rows` is likely modified and later used on error. In some cases this could result in panics due to a nil dereference
rows, err := rqliteDB.QueryOneParameterized(gorqlite.ParameterizedStatement{ Query: `SELECT value FROM kotsadm_params WHERE key = ?`, Arguments: []interface{}{migrationKey}, }) if err != nil { return false, fmt.Errorf("failed to query: %v: %v", err, rows.Err) } -
- Engine
- Semgrep · Pattern-based code analysis
- Counts towards
- Vulnerability
- File
- /pkg/filestore/rqlite_store.go line 54
- Likely real
- Yes, 100% confidence
Variable `wr` is likely modified and later used on error. In some cases this could result in panics due to a nil dereference
wr, err := db.WriteOneParameterized(gorqlite.ParameterizedStatement{ Query: query, Arguments: []interface{}{outputPath, base64.StdEncoding.EncodeToString(bodyBytes)}, }) if err != nil { return fmt.Errorf("failed to write: %v: %v", err, wr.Err) } -
- Engine
- Semgrep · Pattern-based code analysis
- Counts towards
- Vulnerability
- File
- /pkg/store/kotsstore/kotsadm_params_store.go line 83
- Likely real
- Yes, 100% confidence
Variable `wr` is likely modified and later used on error. In some cases this could result in panics due to a nil dereference
wr, err := db.WriteOneParameterized(gorqlite.ParameterizedStatement{ Query: query, Arguments: []interface{}{"IS_KOTSADM_ID_GENERATED", true}, }) if err != nil { return fmt.Errorf("failed to write: %v: %v", err, wr.Err) } -
- Engine
- Semgrep · Pattern-based code analysis
- Counts towards
- Vulnerability
- File
- /pkg/filestore/rqlite_store.go line 109
- Likely real
- Yes, 100% confidence
Variable `wr` is likely modified and later used on error. In some cases this could result in panics due to a nil dereference
wr, err := db.WriteOneParameterized(gorqlite.ParameterizedStatement{ Query: query, Arguments: []interface{}{path, path + "/%"}, }) if err != nil { return fmt.Errorf("failed to delete: %v: %v", err, wr.Err) } -
- Engine
- Semgrep · Pattern-based code analysis
- Counts towards
- Vulnerability
- File
- /pkg/persistence/migrate.go line 209
- Likely real
- Yes, 100% confidence
Variable `rows` is likely modified and later used on error. In some cases this could result in panics due to a nil dereference
rows, err := rqliteDB.QueryOneParameterized(gorqlite.ParameterizedStatement{ Query: `SELECT value FROM kotsadm_params WHERE key = ?`, Arguments: []interface{}{RQLITE_MIGRATION_SUCCESS_KEY}, }) if err != nil { return false, fmt.Errorf("failed to query: %v: %v", err, rows.Err) } -
- Engine
- Semgrep · Pattern-based code analysis
- Counts towards
- Vulnerability
- File
- /pkg/pull/pull.go line 167
- Likely real
- Yes, 100% confidence
Variable `license` is likely modified and later used on error. In some cases this could result in panics due to a nil dereference
license, err := licensewrapper.LoadLicenseFromBytes(licenseData) if err != nil { if errors.Cause(err) == kotslicense.ErrSignatureInvalid { return "", kotslicense.ErrSignatureInvalid } if errors.Cause(err) == kotslicense.ErrSignatureMissing { return "", kotslicense.ErrSignatureMissing } return "", errors.Wrap(err, "failed to parse license from file") } -
- Engine
- Semgrep · Pattern-based code analysis
- Counts towards
- Vulnerability
- File
- /pkg/store/kotsstore/airgap_store.go line 18
- Likely real
- Yes, 100% confidence
Variable `rows` is likely modified and later used on error. In some cases this could result in panics due to a nil dereference
rows, err := db.QueryOne(query) if err != nil { return nil, fmt.Errorf("failed to query pending app: %v: %v", err, rows.Err) } -
- Engine
- Semgrep · Pattern-based code analysis
- Counts towards
- Vulnerability
- File
- /pkg/store/kotsstore/airgap_store.go line 32
- Likely real
- Yes, 100% confidence
Variable `rows` is likely modified and later used on error. In some cases this could result in panics due to a nil dereference
rows, err = db.QueryOneParameterized(gorqlite.ParameterizedStatement{ Query: query, Arguments: []interface{}{id}, }) if err != nil { return nil, fmt.Errorf("failed to query app: %v: %v", err, rows.Err) } -
- Engine
- Semgrep · Pattern-based code analysis
- Counts towards
- Vulnerability
- File
- /pkg/store/kotsstore/airgap_store.go line 54
- Likely real
- Yes, 100% confidence
Variable `rows` is likely modified and later used on error. In some cases this could result in panics due to a nil dereference
rows, err := db.QueryOneParameterized(gorqlite.ParameterizedStatement{ Query: query, Arguments: []interface{}{appID}, }) if err != nil { return nil, fmt.Errorf("failed to query: %v: %v", err, rows.Err) } -
- Engine
- Semgrep · Pattern-based code analysis
- Counts towards
- Vulnerability
- File
- /pkg/store/kotsstore/airgap_store.go line 92
- Likely real
- Yes, 100% confidence
Variable `wr` is likely modified and later used on error. In some cases this could result in panics due to a nil dereference
wr, err := db.WriteOneParameterized(gorqlite.ParameterizedStatement{ Query: query, Arguments: []interface{}{appID}, }) if err != nil { return fmt.Errorf("failed to set update airgap install status: %v: %v", err, wr.Err) } -
- Engine
- Semgrep · Pattern-based code analysis
- Counts towards
- Vulnerability
- File
- /pkg/store/kotsstore/airgap_store.go line 107
- Likely real
- Yes, 100% confidence
Variable `wr` is likely modified and later used on error. In some cases this could result in panics due to a nil dereference
wr, err := db.WriteOneParameterized(gorqlite.ParameterizedStatement{ Query: query, Arguments: []interface{}{isAirgap, appID}, }) if err != nil { return fmt.Errorf("failed to set app airgap flag: %v: %v", err, wr.Err) } -
- Engine
- Semgrep · Pattern-based code analysis
- Counts towards
- Vulnerability
- File
- /pkg/store/kotsstore/app_store.go line 35
- Likely real
- Yes, 100% confidence
Variable `wr` is likely modified and later used on error. In some cases this could result in panics due to a nil dereference
wr, err := db.WriteOneParameterized(gorqlite.ParameterizedStatement{ Query: query, Arguments: []interface{}{appID, cluster.ClusterID, cluster.Name}, }) if err != nil { return fmt.Errorf("failed to create app downstream: %v: %v", err, wr.Err) } -
- Engine
- Semgrep · Pattern-based code analysis
- Counts towards
- Vulnerability
- File
- /pkg/store/kotsstore/embedded_store.go line 46
- Likely real
- Yes, 100% confidence
Variable `wr` is likely modified and later used on error. In some cases this could result in panics due to a nil dereference
wr, err = db.WriteOneParameterized(gorqlite.ParameterizedStatement{ Query: query, Arguments: []interface{}{"embedded.cluster.auth.token", token}, }) if err != nil { return fmt.Errorf("insert embedded cluster auth token: %v: %v", err, wr.Err) } -
- Engine
- Semgrep · Pattern-based code analysis
- Counts towards
- Vulnerability
- File
- /pkg/store/kotsstore/downstream_store.go line 289
- Likely real
- Yes, 100% confidence
Variable `rows` is likely modified and later used on error. In some cases this could result in panics due to a nil dereference
rows, err := db.QueryOneParameterized(gorqlite.ParameterizedStatement{ Query: query, Arguments: []interface{}{appID, clusterID, currentSequence}, }) if err != nil { return nil, fmt.Errorf("failed to query: %v: %v", err, rows.Err) } -
- Engine
- Semgrep · Pattern-based code analysis
- Counts towards
- Vulnerability
- File
- /pkg/store/kotsstore/downstream_store.go line 391
- Likely real
- Yes, 100% confidence
Variable `rows` is likely modified and later used on error. In some cases this could result in panics due to a nil dereference
rows, err := db.QueryOneParameterized(gorqlite.ParameterizedStatement{ Query: query, Arguments: []interface{}{appID, clusterID}, }) if err != nil { return nil, fmt.Errorf("failed to query: %v: %v", err, rows.Err) } -
- Engine
- Semgrep · Pattern-based code analysis
- Counts towards
- Vulnerability
- File
- /pkg/store/kotsstore/downstream_store.go line 1069
- Likely real
- Yes, 100% confidence
Variable `rows` is likely modified and later used on error. In some cases this could result in panics due to a nil dereference
rows, err := db.QueryOneParameterized(gorqlite.ParameterizedStatement{ Query: query, Arguments: []interface{}{appID, parentSequence}, }) if err != nil { return "", fmt.Errorf("failed to query: %v: %v", err, rows.Err) } -
- Engine
- Semgrep · Pattern-based code analysis
- Counts towards
- Vulnerability
- File
- /pkg/store/kotsstore/license_store.go line 24
- Likely real
- Yes, 100% confidence
Variable `rows` is likely modified and later used on error. In some cases this could result in panics due to a nil dereference
rows, err := db.QueryOneParameterized(gorqlite.ParameterizedStatement{ Query: query, Arguments: []interface{}{appID}, }) if err != nil { return nil, fmt.Errorf("failed to query: %v: %v", err, rows.Err) } -
- Engine
- Semgrep · Pattern-based code analysis
- Counts towards
- Vulnerability
- File
- /pkg/store/kotsstore/app_store.go line 725
- Likely real
- Yes, 100% confidence
Variable `wr` is likely modified and later used on error. In some cases this could result in panics due to a nil dereference
wr, err := db.WriteOneParameterized(gorqlite.ParameterizedStatement{ Query: query, Arguments: []interface{}{channelID, appID}, }) if err != nil { return fmt.Errorf("failed to update app channel id: %v: %v", err, wr.Err) } -
- Engine
- Semgrep · Pattern-based code analysis
- Counts towards
- Vulnerability
- File
- /pkg/store/kotsstore/kotsadm_params_store.go line 68
- Likely real
- Yes, 100% confidence
Variable `wr` is likely modified and later used on error. In some cases this could result in panics due to a nil dereference
wr, err := db.WriteOneParameterized(gorqlite.ParameterizedStatement{ Query: query, Arguments: []interface{}{environmentFingerprintKey, fingerprint}, }) if err != nil { return fmt.Errorf("failed to write: %v: %v", err, wr.Err) } -
- Engine
- Semgrep · Pattern-based code analysis
- Counts towards
- Vulnerability
- File
- /pkg/store/kotsstore/kotsadm_params_store.go line 45
- Likely real
- Yes, 100% confidence
Variable `rows` is likely modified and later used on error. In some cases this could result in panics due to a nil dereference
rows, err := db.QueryOneParameterized(gorqlite.ParameterizedStatement{ Query: `select value from kotsadm_params where key = ?`, Arguments: []interface{}{environmentFingerprintKey}, }) if err != nil { return "", fmt.Errorf("failed to query: %v: %v", err, rows.Err) } -
- Engine
- Semgrep · Pattern-based code analysis
- Counts towards
- Vulnerability
- File
- /pkg/store/kotsstore/kotsadm_params_store.go line 18
- Likely real
- Yes, 100% confidence
Variable `rows` is likely modified and later used on error. In some cases this could result in panics due to a nil dereference
rows, err := db.QueryOne(query) if err != nil { return false, fmt.Errorf("failed to query: %v: %v", err, rows.Err) } -
- Engine
- Semgrep · Pattern-based code analysis
- Counts towards
- Vulnerability
- File
- /pkg/store/kotsstore/installation_store.go line 16
- Likely real
- Yes, 100% confidence
Variable `rows` is likely modified and later used on error. In some cases this could result in panics due to a nil dereference
rows, err := db.QueryOne(query) if err != nil { return nil, fmt.Errorf("failed to query: %v: %v", err, rows.Err) } -
- Engine
- Semgrep · Pattern-based code analysis
- Counts towards
- Vulnerability
- File
- /pkg/store/kotsstore/downstream_store.go line 327
- Likely real
- Yes, 100% confidence
Variable `rows` is likely modified and later used on error. In some cases this could result in panics due to a nil dereference
rows, err := db.QueryOneParameterized(gorqlite.ParameterizedStatement{ Query: query, Arguments: []interface{}{appID, clusterID, sequence}, }) if err != nil { return "", fmt.Errorf("failed to query: %v: %v", err, rows.Err) } -
- Engine
- Semgrep · Pattern-based code analysis
- Counts towards
- Vulnerability
- File
- /pkg/store/kotsstore/downstream_store.go line 1122
- Likely real
- Yes, 100% confidence
Variable `rows` is likely modified and later used on error. In some cases this could result in panics due to a nil dereference
rows, err := db.QueryOneParameterized(gorqlite.ParameterizedStatement{ Query: query, Arguments: []interface{}{appID, clusterID, sequence}, }) if err != nil { return nil, fmt.Errorf("failed to query: %v: %v", err, rows.Err) } -
- Engine
- Semgrep · Pattern-based code analysis
- Counts towards
- Vulnerability
- File
- /pkg/store/kotsstore/downstream_store.go line 1207
- Likely real
- Yes, 100% confidence
Variable `rows` is likely modified and later used on error. In some cases this could result in panics due to a nil dereference
rows, err := db.QueryOneParameterized(gorqlite.ParameterizedStatement{ Query: query, Arguments: []interface{}{appID, clusterID, sequence}, }) if err != nil { return false, fmt.Errorf("failed to query: %v: %v", err, rows.Err) } -
- Engine
- Semgrep · Pattern-based code analysis
- Counts towards
- Vulnerability
- File
- /pkg/store/kotsstore/downstream_store.go line 1234
- Likely real
- Yes, 100% confidence
Variable `wr` is likely modified and later used on error. In some cases this could result in panics due to a nil dereference
wr, err := db.WriteOneParameterized(gorqlite.ParameterizedStatement{ Query: query, Arguments: []interface{}{appID, clusterID, sequence, isError, output.DryrunStdout, output.DryrunStderr, output.ApplyStdout, output.ApplyStderr, output.HelmStdout, output.HelmStderr}, }) if err != nil { return fmt.Errorf("failed to write: %v: %v", err, wr.Err) } -
- Engine
- Semgrep · Pattern-based code analysis
- Counts towards
- Vulnerability
- File
- /pkg/store/kotsstore/downstream_store.go line 1250
- Likely real
- Yes, 100% confidence
Variable `wr` is likely modified and later used on error. In some cases this could result in panics due to a nil dereference
wr, err := db.WriteOneParameterized(gorqlite.ParameterizedStatement{ Query: query, Arguments: []interface{}{appID, clusterID, sequence}, }) if err != nil { return fmt.Errorf("failed to write: %v: %v", err, wr.Err) } -
- Engine
- Semgrep · Pattern-based code analysis
- Counts towards
- Vulnerability
- File
- /pkg/store/kotsstore/embedded_cluster_store.go line 19
- Likely real
- Yes, 100% confidence
Variable `wr` is likely modified and later used on error. In some cases this could result in panics due to a nil dereference
wr, err := db.WriteOneParameterized(gorqlite.ParameterizedStatement{ Query: query, Arguments: []interface{}{installID}, }) if err != nil { return "", fmt.Errorf("delete embedded_cluster join token: %w: %v", err, wr.Err) } -
- Engine
- Semgrep · Pattern-based code analysis
- Counts towards
- Vulnerability
- File
- /pkg/store/kotsstore/embedded_cluster_store.go line 33
- Likely real
- Yes, 100% confidence
Variable `wr` is likely modified and later used on error. In some cases this could result in panics due to a nil dereference
wr, err = db.WriteOneParameterized(gorqlite.ParameterizedStatement{ Query: query, Arguments: []interface{}{installID, string(jsonRoles)}, }) if err != nil { return "", fmt.Errorf("insert embedded_cluster join token: %w: %v", err, wr.Err) } -
- Engine
- Semgrep · Pattern-based code analysis
- Counts towards
- Vulnerability
- File
- /pkg/store/kotsstore/embedded_cluster_store.go line 47
- Likely real
- Yes, 100% confidence
Variable `rows` is likely modified and later used on error. In some cases this could result in panics due to a nil dereference
rows, err := db.QueryOneParameterized(gorqlite.ParameterizedStatement{ Query: query, Arguments: []interface{}{token}, }) if err != nil { return nil, fmt.Errorf("failed to query: %w: %v", err, rows.Err) } -
- Engine
- Semgrep · Pattern-based code analysis
- Counts towards
- Vulnerability
- File
- /pkg/store/kotsstore/embedded_store.go line 14
- Likely real
- Yes, 100% confidence
Variable `rows` is likely modified and later used on error. In some cases this could result in panics due to a nil dereference
rows, err := db.QueryOneParameterized(gorqlite.ParameterizedStatement{ Query: query, Arguments: []interface{}{"embedded.cluster.auth.token"}, }) if err != nil { return "", fmt.Errorf("failed to query: %v: %v", err, rows.Err) } -
- Engine
- Semgrep · Pattern-based code analysis
- Counts towards
- Vulnerability
- File
- /pkg/store/kotsstore/embedded_store.go line 37
- Likely real
- Yes, 100% confidence
Variable `wr` is likely modified and later used on error. In some cases this could result in panics due to a nil dereference
wr, err := db.WriteOneParameterized(gorqlite.ParameterizedStatement{ Query: query, Arguments: []interface{}{"embedded.cluster.auth.token"}, }) if err != nil { return fmt.Errorf("delete embedded cluster auth token: %v: %v", err, wr.Err) } -
- Engine
- Semgrep · Pattern-based code analysis
- Counts towards
- Vulnerability
- File
- /pkg/store/kotsstore/cluster_store.go line 195
- Likely real
- Yes, 100% confidence
Variable `wr` is likely modified and later used on error. In some cases this could result in panics due to a nil dereference
wr, err := db.WriteOneParameterized(gorqlite.ParameterizedStatement{ Query: query, Arguments: []interface{}{snapshotSchedule, clusterID}, }) if err != nil { return fmt.Errorf("failed to write: %v: %v", err, wr.Err) } -
- Engine
- Semgrep · Pattern-based code analysis
- Counts towards
- Vulnerability
- File
- /pkg/store/kotsstore/appstatus_store.go line 17
- Likely real
- Yes, 100% confidence
Variable `rows` is likely modified and later used on error. In some cases this could result in panics due to a nil dereference
rows, err := db.QueryOneParameterized(gorqlite.ParameterizedStatement{ Query: query, Arguments: []interface{}{appID}, }) if err != nil { return nil, fmt.Errorf("failed to query: %v: %v", err, rows.Err) } -
- Engine
- Semgrep · Pattern-based code analysis
- Counts towards
- Vulnerability
- File
- /pkg/store/kotsstore/appstatus_store.go line 79
- Likely real
- Yes, 100% confidence
Variable `wr` is likely modified and later used on error. In some cases this could result in panics due to a nil dereference
wr, err := db.WriteOneParameterized(gorqlite.ParameterizedStatement{ Query: query, Arguments: []interface{}{appID, string(marshalledResourceStates), updatedAt.Unix(), sequence}, }) if err != nil { return fmt.Errorf("failed to write: %v: %v", err, wr.Err) } -
- Engine
- Semgrep · Pattern-based code analysis
- Counts towards
- Vulnerability
- File
- /pkg/store/kotsstore/branding_store.go line 19
- Likely real
- Yes, 100% confidence
Variable `rows` is likely modified and later used on error. In some cases this could result in panics due to a nil dereference
rows, err := db.QueryOne(query) if err != nil { return nil, fmt.Errorf("failed to query: %v: %v", err, rows.Err) } -
- Engine
- Semgrep · Pattern-based code analysis
- Counts towards
- Vulnerability
- File
- /pkg/store/kotsstore/branding_store.go line 53
- Likely real
- Yes, 100% confidence
Variable `wr` is likely modified and later used on error. In some cases this could result in panics due to a nil dereference
wr, err := db.WriteOneParameterized(gorqlite.ParameterizedStatement{ Query: query, Arguments: []interface{}{id, encodedBrandingArchive, time.Now().Unix()}, }) if err != nil { return "", fmt.Errorf("failed to insert initial branding: %v: %v", err, wr.Err) } -
- Engine
- Semgrep · Pattern-based code analysis
- Counts towards
- Vulnerability
- File
- /pkg/store/kotsstore/branding_store.go line 83
- Likely real
- Yes, 100% confidence
Variable `rows` is likely modified and later used on error. In some cases this could result in panics due to a nil dereference
rows, err := db.QueryOne(query) if err != nil { return nil, fmt.Errorf("failed to query: %v: %v", err, rows.Err) } -
- Engine
- Semgrep · Pattern-based code analysis
- Counts towards
- Vulnerability
- File
- /pkg/store/kotsstore/branding_store.go line 131
- Likely real
- Yes, 100% confidence
Variable `rows` is likely modified and later used on error. In some cases this could result in panics due to a nil dereference
rows, err := db.QueryOneParameterized(gorqlite.ParameterizedStatement{ Query: query, Arguments: []interface{}{appID}, }) if err != nil { return nil, fmt.Errorf("failed to query: %v: %v", err, rows.Err) } -
- Engine
- Semgrep · Pattern-based code analysis
- Counts towards
- Vulnerability
- File
- /pkg/store/kotsstore/cluster_store.go line 21
- Likely real
- Yes, 100% confidence
Variable `rows` is likely modified and later used on error. In some cases this could result in panics due to a nil dereference
rows, err := db.QueryOne(query) if err != nil { return nil, fmt.Errorf("failed to query: %v: %v", err, rows.Err) } -
- Engine
- Semgrep · Pattern-based code analysis
- Counts towards
- Vulnerability
- File
- /pkg/store/kotsstore/cluster_store.go line 64
- Likely real
- Yes, 100% confidence
Variable `rows` is likely modified and later used on error. In some cases this could result in panics due to a nil dereference
rows, err := db.QueryOneParameterized(gorqlite.ParameterizedStatement{ Query: query, Arguments: []interface{}{slug}, }) if err != nil { return "", fmt.Errorf("failed to query: %v: %v", err, rows.Err) } -
- Engine
- Semgrep · Pattern-based code analysis
- Counts towards
- Vulnerability
- File
- /pkg/store/kotsstore/cluster_store.go line 87
- Likely real
- Yes, 100% confidence
Variable `rows` is likely modified and later used on error. In some cases this could result in panics due to a nil dereference
rows, err := db.QueryOneParameterized(gorqlite.ParameterizedStatement{ Query: query, Arguments: []interface{}{deployToken}, }) if err != nil { return "", fmt.Errorf("failed to query: %v: %v", err, rows.Err) } -
- Engine
- Semgrep · Pattern-based code analysis
- Counts towards
- Vulnerability
- File
- /pkg/store/kotsstore/cluster_store.go line 121
- Likely real
- Yes, 100% confidence
Variable `rows` is likely modified and later used on error. In some cases this could result in panics due to a nil dereference
rows, err := db.QueryOneParameterized(gorqlite.ParameterizedStatement{ Query: query, Arguments: []interface{}{slugProposal}, }) if err != nil { return "", fmt.Errorf("failed to query: %v: %v", err, rows.Err) } -
- Engine
- Semgrep · Pattern-based code analysis
- Counts towards
- Vulnerability
- File
- /pkg/store/kotsstore/cluster_store.go line 178
- Likely real
- Yes, 100% confidence
Variable `wr` is likely modified and later used on error. In some cases this could result in panics due to a nil dereference
wr, err := db.WriteOneParameterized(gorqlite.ParameterizedStatement{ Query: query, Arguments: []interface{}{snapshotTTL, clusterID}, }) if err != nil { return fmt.Errorf("failed to write: %v: %v", err, wr.Err) } -
- Engine
- Semgrep · Pattern-based code analysis
- Counts towards
- Vulnerability
- File
- /pkg/store/kotsstore/downstream_store.go line 226
- Likely real
- Yes, 100% confidence
Variable `rows` is likely modified and later used on error. In some cases this could result in panics due to a nil dereference
rows, err := db.QueryOneParameterized(gorqlite.ParameterizedStatement{ Query: query, Arguments: []interface{}{appID, sequence}, }) if err != nil { return false, fmt.Errorf("failed to query: %v: %v", err, rows.Err) } -
- Engine
- Semgrep · Pattern-based code analysis
- Counts towards
- Vulnerability
- File
- /pkg/store/kotsstore/downstream_store.go line 29
- Likely real
- Yes, 100% confidence
Variable `rows` is likely modified and later used on error. In some cases this could result in panics due to a nil dereference
rows, err := db.QueryOneParameterized(gorqlite.ParameterizedStatement{ Query: query, Arguments: []interface{}{appID, clusterID}, }) if err != nil { return -1, fmt.Errorf("failed to query: %v: %v", err, rows.Err) } -
- Engine
- Semgrep · Pattern-based code analysis
- Counts towards
- Vulnerability
- File
- /pkg/store/kotsstore/downstream_store.go line 63
- Likely real
- Yes, 100% confidence
Variable `rows` is likely modified and later used on error. In some cases this could result in panics due to a nil dereference
rows, err := db.QueryOneParameterized(gorqlite.ParameterizedStatement{ Query: query, Arguments: []interface{}{appID, clusterID, currentSequence}, }) if err != nil { return -1, fmt.Errorf("failed to query: %v: %v", err, rows.Err) } -
- Engine
- Semgrep · Pattern-based code analysis
- Counts towards
- Vulnerability
- File
- /pkg/store/kotsstore/downstream_store.go line 89
- Likely real
- Yes, 100% confidence
Variable `rows` is likely modified and later used on error. In some cases this could result in panics due to a nil dereference
rows, err := db.QueryOneParameterized(gorqlite.ParameterizedStatement{ Query: query, Arguments: []interface{}{appID, clusterID, sequence}, }) if err != nil { return -1, fmt.Errorf("failed to query: %v: %v", err, rows.Err) } -
- Engine
- Semgrep · Pattern-based code analysis
- Counts towards
- Vulnerability
- File
- /pkg/store/kotsstore/downstream_store.go line 115
- Likely real
- Yes, 100% confidence
Variable `rows` is likely modified and later used on error. In some cases this could result in panics due to a nil dereference
rows, err := db.QueryOneParameterized(gorqlite.ParameterizedStatement{ Query: query, Arguments: []interface{}{appID, clusterID}, }) if err != nil { return -1, fmt.Errorf("failed to query: %v: %v", err, rows.Err) } -
- Engine
- Semgrep · Pattern-based code analysis
- Counts towards
- Vulnerability
- File
- /pkg/store/kotsstore/downstream_store.go line 166
- Likely real
- Yes, 100% confidence
Variable `wr` is likely modified and later used on error. In some cases this could result in panics due to a nil dereference
wr, err := db.WriteOneParameterized(gorqlite.ParameterizedStatement{ Query: query, Arguments: []interface{}{status, statusInfo, appID, sequence}, }) if err != nil { return fmt.Errorf("failed to write: %v: %v", err, wr.Err) } -
- Engine
- Semgrep · Pattern-based code analysis
- Counts towards
- Vulnerability
- File
- /pkg/store/kotsstore/downstream_store.go line 181
- Likely real
- Yes, 100% confidence
Variable `rows` is likely modified and later used on error. In some cases this could result in panics due to a nil dereference
rows, err := db.QueryOneParameterized(gorqlite.ParameterizedStatement{ Query: query, Arguments: []interface{}{appID, sequence}, }) if err != nil { return "", fmt.Errorf("failed to query: %v: %v", err, rows.Err) } -
- Engine
- Semgrep · Pattern-based code analysis
- Counts towards
- Vulnerability
- File
- /pkg/store/kotsstore/downstream_store.go line 204
- Likely real
- Yes, 100% confidence
Variable `rows` is likely modified and later used on error. In some cases this could result in panics due to a nil dereference
rows, err := db.QueryOneParameterized(gorqlite.ParameterizedStatement{ Query: query, Arguments: []interface{}{appID, sequence}, }) if err != nil { return "", fmt.Errorf("failed to query: %v: %v", err, rows.Err) } -
- Engine
- Semgrep · Pattern-based code analysis
- Counts towards
- Vulnerability
- File
- /e2e/playwright/shared-core/support-bundle.ts line 235
- Likely real
- Yes, 100% confidence
`command.replace` method will only replace the first occurrence when used with a string argument ("\n"). If this method is used for escaping of dangerous data then there is a possibility for a bypass. Try to use sanitization library instead or use a Regex with a global flag.
let fixedCommand = command.replace("\n", "").replace("bashkubectl", "bash && yes | kubectl").trim(); -
- Engine
- Semgrep · Pattern-based code analysis
- Counts towards
- Vulnerability
- File
- /pkg/handlers/metadata.go line 73
- Likely real
- Yes, 99% confidence
Variable `kotsadmMetadata` is likely modified and later used on error. In some cases this could result in panics due to a nil dereference
brandingConfigMap, kotsadmMetadata, err := getK8sInfoFn() if err != nil { // if we can't find config map in cluster, it's not an error, we still want to return a stripped down response if kuberneteserrors.IsNotFound(err) { metadataResponse.AdminConsoleMetadata.IsAirgap = kotsadmMetadata.IsAirgap metadataResponse.AdminConsoleMetadata.IsKurl = kotsadmMetadata.IsKurl metadataResponse.AdminConsoleMetadata.IsEmbeddedCluster = kotsadmMetadata.IsEmbeddedCluster logger.Info(fmt.Sprintf("config map %q not found", metadataConfigMapName)) JSON(w, http.StatusOK, &metadataResponse) return } logger.Error(err) w.WriteHeader(http.StatusServiceUnavailable) return } -
- Engine
- Semgrep · Pattern-based code analysis
- Counts towards
- Vulnerability
- File
- /pkg/k8sutil/portforward.go line 238
- Likely real
- Yes, 99% confidence
Iteration over a possibly empty map `forwardedAdditionalPorts`. This is likely a bug or redundant code
forwardedAdditionalPorts := map[AdditionalPort]chan struct{}{} keepPolling := true go func() { <-stopChan keepPolling = false }() uri := fmt.Sprintf("http://localhost:%d/api/v1/kots/ports", localPort) consecutiveErrorsLogged := struct { read int unmarshal int }{ read: 0, unmarshal: 0, } sleepTime := time.Second go func() { prevServiceForwardErrMap := map[string]error{} for keepPolling { time.Sleep(sleepTime) sleepTime = time.Second * 5 req, err := http.NewRequest("GET", uri, nil) if err != nil { log.Error(errors.Wrap(err, "failed to create request")) continue } req.Header.Set("Accept", "application/json") authSlug, err := auth.GetOrCreateAuthSlug(clientset, namespace) if err != nil { log.Error(errors.Wrap(err, "failed to get kotsadm auth slug")) continue } req.Header.Add("Authorization", authSlug) resp, err := http.DefaultClient.Do(req) if err != nil { log.Info("failed execute http request while listing additional ports: %v", err) continue } if resp.StatusCode != http.StatusOK { // Don't log server side errors. This will happen when app has not been installed yet, // for example, and relevant logs should be in the kotsadm pod. continue } defer resp.Body.Close() b, err := ioutil.ReadAll(resp.Body) if err != nil { if consecutiveErrorsLogged.read == 0 { log.Info("failed to read response body while listing additional ports: %v", err) consecutiveErrorsLogged.read++ } continue } consecutiveErrorsLogged.read = 0 response := struct { DesiredAdditionalPorts []AdditionalPort `json:"ports"` }{} if err := json.Unmarshal(b, &response); err != nil { if consecutiveErrorsLogged.unmarshal == 0 { log.Info("failed to decode response while listing additional ports: %s", b) consecutiveErrorsLogged.unmarshal++ } continue } consecutiveErrorsLogged.unmarshal = 0 for _, desiredAdditionalPort := range response.DesiredAdditionalPorts { alreadyForwarded := false for forwardedAdditionalPort := range forwardedAdditionalPorts { // Avoid port conflicts by only taking the first to claim a local port if forwardedAdditionalPort.LocalPort == desiredAdditionalPort.LocalPort { alreadyForwarded = true break } } if alreadyForwarded { continue } serviceStopCh, err := ServiceForward(clientset, cfg, desiredAdditionalPort.LocalPort, desiredAdditionalPort.ServicePort, namespace, desiredAdditionalPort.ServiceName) if err != nil { prevServiceForwardErr := prevServiceForwardErrMap[desiredAdditionalPort.ServiceName] if prevServiceForwardErr == nil || prevServiceForwardErr.Error() != err.Error() { log.Error(errors.Wrap(err, fmt.Sprintf("failed to execute kubectl port-forward -n %s svc/%s %d:%d", namespace, desiredAdditionalPort.ServiceName, desiredAdditionalPort.LocalPort, desiredAdditionalPort.ServicePort))) prevServiceForwardErrMap[desiredAdditionalPort.ServiceName] = err } continue // try again } if serviceStopCh == nil { // we didn't do the port forwarding, probably because the pod isn't ready. // try again next loop // The API doesn't return ports that aren't ready, so this is possibly rbac? err = errors.Errorf("failed to forward port. check that you have permission to run kubectl port-forward -n %s svc/%s %d:%d", namespace, desiredAdditionalPort.ServiceName, desiredAdditionalPort.LocalPort, desiredAdditionalPort.ServicePort) prevServiceForwardErr := prevServiceForwardErrMap[desiredAdditionalPort.ServiceName] if prevServiceForwardErr == nil || prevServiceForwardErr.Error() != err.Error() { log.Error(err) prevServiceForwardErrMap[desiredAdditionalPort.ServiceName] = err } continue // try again } forwardedAdditionalPorts[desiredAdditionalPort] = serviceStopCh log.ActionWithoutSpinner("Go to http://localhost:%d to access the application", desiredAdditionalPort.LocalPort) } } }() -
- Engine
- Semgrep · Pattern-based code analysis
- Counts towards
- Vulnerability
- File
- /.github/dependabot.yml line 18
- Likely real
- Yes, 99% confidence
This Dependabot configuration does not set a cooldown period. Newly published packages can be malicious or unstable. Add a `cooldown` block with `default-days: 7` to each `package-ecosystem` entry under `updates` to wait 7 days before proposing updates to newly published package versions. Reference: https://docs.github.com/en/code-security/dependabot/dependabot-version-updates/configuration-options-for-the-dependabot.yml-file#cooldown
- package-ecosystem: "github-actions" directories: - ".github/actions/*" open-pull-requests-limit: 5 schedule: interval: "weekly" day: "saturday" time: "02:30" labels: - "dependabot" - "github-actions" - "type::chore" -
- Engine
- Semgrep · Pattern-based code analysis
- Counts towards
- Vulnerability
- File
- /.github/dependabot.yml line 6
- Likely real
- Yes, 99% confidence
This Dependabot configuration does not set a cooldown period. Newly published packages can be malicious or unstable. Add a `cooldown` block with `default-days: 7` to each `package-ecosystem` entry under `updates` to wait 7 days before proposing updates to newly published package versions. Reference: https://docs.github.com/en/code-security/dependabot/dependabot-version-updates/configuration-options-for-the-dependabot.yml-file#cooldown
- package-ecosystem: "github-actions" directory: "/" open-pull-requests-limit: 5 schedule: interval: "weekly" day: "saturday" time: "02:30" labels: - "dependabot" - "github-actions" - "type::chore" -
- Engine
- Semgrep · Pattern-based code analysis
- Counts towards
- Vulnerability
- File
- /pkg/snapshot/restore.go line 161
- Likely real
- Yes, 99% confidence
Variable `restore` is likely modified and later used on error. In some cases this could result in panics due to a nil dereference
restore, err = waitForVeleroRestoreCompleted(ctx, veleroNamespace, restore.ObjectMeta.Name) if err != nil { if restore != nil { errMsg := fmt.Sprintf("Admin Console restore failed with %d errors and %d warnings.", restore.Status.Errors, restore.Status.Warnings) log.FinishSpinnerWithError() log.ActionWithoutSpinner("%s", errMsg) return errors.Wrap(err, errMsg) } log.FinishSpinnerWithError() return errors.Wrap(err, "failed to wait for velero restore completed") } -
- Engine
- Semgrep · Pattern-based code analysis
- Counts towards
- Vulnerability
- File
- /pkg/snapshot/backup.go line 147
- Likely real
- Yes, 99% confidence
Variable `backup` is likely modified and later used on error. In some cases this could result in panics due to a nil dereference
backup, err := waitForVeleroBackupCompleted(ctx, clientset, backupResponse.BackupName, options.Namespace) if err != nil { if backup != nil { errMsg := fmt.Sprintf("backup failed with %d errors and %d warnings.", backup.Status.Errors, backup.Status.Warnings) log.FinishSpinnerWithError() log.ActionWithoutSpinner("%s", errMsg) return nil, errors.Wrap(err, errMsg) } log.FinishSpinnerWithError() return nil, errors.Wrap(err, "failed to wait for velero backup completed") } -
- Engine
- Semgrep · Pattern-based code analysis
- Counts towards
- Vulnerability
- File
- /.github/workflows/regression.yaml line 73
- Likely real
- Yes, 98% confidence
A secret is exposed in the workflow-level `env:` block, making it available to every job and step in this workflow — including any untrusted code run in pull-request workflows. Scope secrets as narrowly as possible: prefer step-level `env:` so the secret is only available where it is actually needed.
TF_VAR_testim_token: ${{ secrets.TESTIM_ACCESS_TOKEN }} -
- Engine
- Semgrep · Pattern-based code analysis
- Counts towards
- Vulnerability
- File
- /.github/workflows/e2e-infra-cleanup.yaml line 18
- Likely real
- Yes, 97% confidence
A secret is exposed in the workflow-level `env:` block, making it available to every job and step in this workflow — including any untrusted code run in pull-request workflows. Scope secrets as narrowly as possible: prefer step-level `env:` so the secret is only available where it is actually needed.
AWS_SECRET_ACCESS_KEY: ${{ secrets.E2E_TESTIM_AWS_SECRET_ACCESS_KEY }} -
- Engine
- Semgrep · Pattern-based code analysis
- Counts towards
- Vulnerability
- File
- /.github/workflows/e2e-infra-cleanup.yaml line 17
- Likely real
- Yes, 97% confidence
A secret is exposed in the workflow-level `env:` block, making it available to every job and step in this workflow — including any untrusted code run in pull-request workflows. Scope secrets as narrowly as possible: prefer step-level `env:` so the secret is only available where it is actually needed.
AWS_ACCESS_KEY_ID: ${{ secrets.E2E_TESTIM_AWS_ACCESS_KEY_ID }} -
- Engine
- GuardDog · Supply-chain attack heuristics
- Counts towards
- Malicious pattern
- File
- /cmd/imagedeps/main.go line 25
- Likely real
- Yes, 96% confidence
Detects access to sensitive files (credentials, configs, keys) [threat-filesystem-read]
outputConstantFilename = "pkg/image/constants.go" outputEnvFilename = ".image.env" dockerRegistryUrl = "https://index.docker.io" githubPageSize = 100 -
- Engine
- GuardDog · Supply-chain attack heuristics
- Counts towards
- Malicious pattern
- File
- /pkg/identity/assets.go line 3
- Likely real
- Yes, 94% confidence
Detects heavy obfuscation techniques commonly used by malware [threat-runtime-obfuscation]
..."Ym9keSwKaHRtbCB7CiAgbWFyZ2luOiAwOwogIHBhZGRpbmc6IDA7CiAgd2lkdGg6IDEwMCU7CiAgaGVpZ2h0OiAxMDAlOwp9Cgpib2R5IHsKICBmb250LWZhbWlseTogIkhlbHZldGljYSBOZXVlIiwgIkhlbHZldGljYSIsIHNhbnMtc2VyaWY7CiAgZm9udC13ZWlnaHQ6IDQwMDsKICBkaXNwbGF5OiBmbGV4OwogIGZsZXgtZGlyZWN0aW9uOiBjb2x1bW47CiAgZmxleDogMTsKICAtd2Via2l0LWZvbnQtc21vb3RoaW5nOiBhbnRpYWxpYXNlZDsKICBvdmVyZmxvdzogYXV0bzsKfQoKLnRoZW1lLWJvZHkgewogIGJhY2tncm91bmQtY29sb3I6I0ZGRkZGRjsKfQoKLnRoZW1lLW5hdmJhciB7CiAgZGlzcGxheTogZmxleDsKICB3aWR0aDogMTAwJTsKICBwYWRkaW5nOiAwOwogIGJ... -
- Engine
- GuardDog · Supply-chain attack heuristics
- Counts towards
- Malicious pattern
- File
- /.github/actions/copy-assets/main.go line 46
- Likely real
- Yes, 93% confidence
Detects reading of environment variables (credential access, often contains secrets) [threat-runtime-environment-read]
ts := oauth2.StaticTokenSource( &oauth2.Token{AccessToken: os.Getenv("GITHUB_TOKEN")}, ) client := github.NewClient(oauth2.NewClient(ctx, ts)) -
- Engine
- GuardDog · Supply-chain attack heuristics
- Counts towards
- Malicious pattern
- File
- /.github/actions/cmx-versions/dist/index.js line 39674
- Likely real
- Yes, 93% confidence
Detects reading of environment variables (credential access, often contains secrets) [threat-runtime-environment-read]
const url = 'https://api.replicated.com/vendor/v3/cluster/versions'; const apiToken = getInput('replicated-api-token') || process.env.REPLICATED_API_TOKEN; const headers = { Authorization: apiToken -
- Engine
- GuardDog · Supply-chain attack heuristics
- Counts towards
- Malicious pattern
- File
- /.github/actions/cmx-versions/index.js line 11
- Likely real
- Yes, 93% confidence
Detects reading of environment variables (credential access, often contains secrets) [threat-runtime-environment-read]
const url = 'https://api.replicated.com/vendor/v3/cluster/versions'; const apiToken = core.getInput('replicated-api-token') || process.env.REPLICATED_API_TOKEN; const headers = { Authorization: apiToken -
- Engine
- YARA · Malware signature rules
- Counts towards
- Malicious pattern
- File
- /dev/dockerfiles/kotsadm-migrations/Dockerfile.ttlsh
- Likely real
- Probably noise, 0% confidence
YARA rule matched: detect_downloader — Downloads a remote resource - common and low-signal alone; see detect_download_and_execute for the composite version
-
- Engine
- YARA · Malware signature rules
- Counts towards
- Malicious pattern
- File
- /.github/workflows/build-test.yaml
- Likely real
- Probably noise, 0% confidence
YARA rule matched: detect_downloader — Downloads a remote resource - common and low-signal alone; see detect_download_and_execute for the composite version
-
- Engine
- YARA · Malware signature rules
- Counts towards
- Malicious pattern
- File
- /pkg/kotsadm/objects/scripts/wait-for-rqlite.sh
- Likely real
- Probably noise, 0% confidence
YARA rule matched: detect_downloader — Downloads a remote resource - common and low-signal alone; see detect_download_and_execute for the composite version
No findings match these filters.