Skip to content

Security: BryanJames16/RelaySpark

Security

Docs/security.md

πŸ”’ Pipeline Security Jobs

πŸ” trivy-scan

Wrapper for all trivy scans.

πŸ—ƒοΈ Variables

  • TRIVY_SCAN_TYPE: Type of scan to perform. Allowed values are: sast, cs, container, image, and repo.

πŸ’» Command

make trivy-scan

πŸ•ΆοΈ Requirements

  • Container image with trivy installed.

πŸ” trivy-image-scan

Trivy container image scanning.

πŸ—ƒοΈ Variables

  • TRIVY_IMAGE_SCAN_IMAGE_URL: Full image name and tag for sccanning. You can also instead use --input <TAR_FILE> if you want to scan a tar file.
  • TRIVY_IMAGE_SCAN_OUTPUT_FORMAT: Output format for Trivy. Allowed values are: table, json, template, sarif, cyclonedx, spdx, spdx-json, github, and cosign-vuln.
  • TRIVY_IMAGE_SCAN_EXIT_CODE: Exit code for trivy scan (1 for vulnerabilities detected, 0 for none).
  • TRIVY_IMAGE_SCAN_OUTPUT_FILE: Output file for trivy scan.

πŸ’» Command

# Via docker compose wrapper
make trivy-image-scan

# Job Call
make _trivy-image-scan

πŸ•ΆοΈ Requirements

  • Container image with trivy installed.

πŸ” trivy-fs-scan

Trivy filesystem scanning.

πŸ—ƒοΈ Variables

  • TRIVY_FS_SCAN_PATH: Path where trivy will start scanning.
  • TRIVY_FS_SCAN_OUTPUT_FORMAT: Output format for Trivy. Allowed values are: table, json, template, sarif, cyclonedx, spdx, spdx-json, github, and cosign-vuln.
  • TRIVY_FS_SCAN_EXIT_CODE: Exit code for trivy scan (1 for vulnerabilities detected, 0 for none).
  • TRIVY_FS_SCAN_OUTPUT_FILE: Output file for trivy scan.
  • TRIVY_FS_SCAN_ADDITIONAL_PARAMETERS: Any additional trivy scan parameters.

πŸ’» Command

# Via docker compose wrapper
make trivy-fs-scan

# Job Call
make _trivy-fs-scan

πŸ•ΆοΈ Requirements

  • Container image with trivy installed.

πŸ” trivy-repo-scan

Trivy repository scanning.

πŸ—ƒοΈ Variables

  • TRIVY_REPO_SCAN_URL: Repository URL to scan (can be remote or local repo).
  • TRIVY_REPO_SCAN_OUTPUT_FORMAT: Output format for Trivy. Allowed values are: table, json, template, sarif, cyclonedx, spdx, spdx-json, github, and cosign-vuln.
  • TRIVY_REPO_SCAN_EXIT_CODE: Exit code for trivy scan (1 for vulnerabilities detected, 0 for none).
  • TRIVY_REPO_SCAN_OUTPUT_FILE: Output file for trivy scan.
  • TRIVY_REPO_SCAN_ADDITIONAL_PARAMETERS: Any additional trivy scan parameters.

πŸ’» Command

# Via docker compose wrapper
make trivy-repo-scan

# Job Call
make _trivy-repo-scan

πŸ•ΆοΈ Requirements

  • Container image with trivy installed.

πŸ” gitleaks-scan

Wrapper for all gitleaks scans.

πŸ—ƒοΈ Variables

  • GITLEAKS_SCAN_TYPE: Type of scan to perform. Allowed values are: repo, git, dir, file, directory, or folder.

πŸ’» Command

make gitleaks-scan

πŸ•ΆοΈ Requirements

  • Container image with gitleaks installed.

πŸ” gitleaks-dir-scan

Gitleaks directory scanning.

πŸ—ƒοΈ Variables

  • GITLEAKS_DIR_SCAN_PATH: Path where Gitleaks will scan for exposed secrets.
  • GITLEAKS_DIR_SCAN_OUTPUT_FORMAT: Output format for Gitleaks. Allowed values are: json, csv, junit, sarif, template.
  • GITLEAKS_DIR_SCAN_OUTPUT_FILE: Path and file name for report output.
  • GITLEAKS_DIR_SCAN_EXIT_CODE: Exit code for gitleaks scan (1 for vulnerabilities detected, 0 for none).
  • GITLEAKS_DIR_SCAN_ADDITIONAL_PARAMETERS: Any additional gitleaks scan parameters.

πŸ’» Command

# Via docker compose wrapper
make gitleaks-dir-scan

# Job Call
make _gitleaks-dir-scan

πŸ•ΆοΈ Requirements

  • Container image with gitleaks installed.

πŸ” gitleaks-repo-scan

Gitleaks git repository scanning.

πŸ—ƒοΈ Variables

  • GITLEAKS_REPO_SCAN_PATH: Path where Gitleaks will scan for exposed secrets.
  • GITLEAKS_REPO_SCAN_OUTPUT_FORMAT: Output format for Gitleaks. Allowed values are: json, csv, junit, sarif, template.
  • GITLEAKS_REPO_SCAN_OUTPUT_FILE: Path and file name for report output.
  • GITLEAKS_REPO_SCAN_EXIT_CODE: Exit code for gitleaks scan (1 for vulnerabilities detected, 0 for none).
  • GITLEAKS_REPO_SCAN_ADDITIONAL_PARAMETERS: Any additional gitleaks scan parameters.

πŸ’» Command

# Via docker compose wrapper
make gitleaks-repo-scan

# Job Call
make _gitleaks-repo-scan

πŸ•ΆοΈ Requirements

  • Container image with gitleaks installed.

πŸ” kubesec-scan

Wrapper for kubesec scanning.

πŸ—ƒοΈ Variables

  • KUBESEC_SCAN_TYPE: Type of scanning to be done. Valid values are manifest and helm.

πŸ’» Command

make kubesec-scan

πŸ•ΆοΈ Requirements

  • Container image with kubesec installed.

πŸ” kubesec-manifest-scan

Kubernetes SAST manifest scanning.

πŸ—ƒοΈ Variables

  • KUBESEC_MANIFEST_SCAN_PATH: Path to scan YAML manifest files.
  • KUBESEC_MANIFEST_SCAN_ADDITIONAL_PARAMETERS: Additional parameters for kubesec.

πŸ’» Command

# Via docker compose wrapper
make kubesec-manifest-scan

# Job Call
make _kubesec-manifest-scan

πŸ•ΆοΈ Requirements

  • Container image with kubesec installed.

πŸ” kubesec-helm-scan

Kubernetes SAST helm scanning.

πŸ—ƒοΈ Variables

  • KUBESEC_HELM_SCAN_PATH: Path to scan helm chart.
  • KUBESEC_HELM_VALUES_SCAN_PATH: Path to scan helm chart values.
  • KUBESEC_HELM_SCAN_ADDITIONAL_PARAMETERS: Additional parameters for kubesec.

πŸ’» Command

# Via docker compose wrapper
make kubesec-helm-scan

# Job Call
make _kubesec-helm-scan

πŸ•ΆοΈ Requirements

  • Container image with kubesec installed.

πŸ” horusec-scan

SAST scanning through Horusec.

πŸ—ƒοΈ Variables

  • HORUSEC_SCAN_CONFIG_FILE_PATH: Path where horusec configuration can be found.
  • HORUSEC_SCAN_PATH: Path where horusec will start scanning.
  • HORUSEC_SCAN_LOG_FILE_PATH: Path and filename of the log file.
  • HORUSEC_SCAN_LOG_LEVEL: Log level of horusec. Valid values are: panic, fatal, error, warn, info, debug, and trace.
  • HORUSEC_SCAN_ADDITIONAL_PARAMETERS: Additional parameters for horusec.

πŸ’» Command

# Via docker compose wrapper
make horusec-scan

# Job Call
make _horusec-scan

πŸ•ΆοΈ Requirements

  • Container image with horusec installed.

πŸ” cosign-container-image-tar-signing

Container signing for container images in tar format.

πŸ—ƒοΈ Variables

  • COSIGN_CONTAINER_SIGNING_KEY_PATH: Path where the key can be found.
  • COSIGN_CONTAINER_IMAGE_PATH: Path to the container image tar file.
  • COSIGN_CONTAINER_SIGNING_ADDITIONAL_PARAMETERS: Additional parameters for cosign command.

πŸ’» Command

# Via docker compose wrapper
make cosign-container-image-tar-signing

# Job Call
make _cosign-container-image-tar-signing

πŸ•ΆοΈ Requirements

  • Container image with cosign installed.
  • Security key to be used by cosign.

πŸ” cosign-blob-signing

Job for blob signing through cosign.

πŸ—ƒοΈ Variables

  • COSIGN_BLOB_SIGNING_KEY_PATH: Path where the key can be found.
  • COSIGN_BLOB_FILE: Full path and file to the blob.
  • COSIGN_BLOB_ADDITIONAL_PARAMETERS: Additional parameters for cosign command.

πŸ’» Command

# Via docker compose wrapper
make cosign-blob-signing

# Job Call
make _cosign-blob-signing

πŸ•ΆοΈ Requirements

  • Container image with cosign installed.
  • Security key to be used by cosign.

πŸ” osv-scan

Wrapper job for OSV scans.

πŸ—ƒοΈ Variables

  • OSV_SCAN_TYPE: Scan type for OSV. Valid values are container_image, container_tar, source, and license.

πŸ’» Command

# Via docker compose wrapper
make osv-scan

# Job Call
make _osv-scan

πŸ•ΆοΈ Requirements

  • Container image with OSV scanner installed.

πŸ” osv-container-image-scan

Job for OSV conatiner image scan.

πŸ—ƒοΈ Variables

  • OSV_CONTAINER_IMAGE_SCAN_IMAGE_NAME: Container image name to be scanned.
  • OSV_CONTAINER_IMAGE_SCAN_ADDITIONAL_PARAMETERS: Container image tag to be scanned.
  • COSIGN_BLOB_ADDITIONAL_PARAMETERS: Additional parameters for OSV container image scan.

πŸ’» Command

# Via docker compose wrapper
make osv-container-image-scan

# Job Call
make _osv-container-image-scan

πŸ•ΆοΈ Requirements

  • Container image with OSV scanner installed.

πŸ” osv-container-tar-scan

Job for OSV conatiner tar scan.

πŸ—ƒοΈ Variables

  • OSV_CONTAINER_TAR_SCAN_PATH: Full path and file name of the container image tar.
  • OSV_CONTAINER_TAR_SCAN_ADDITIONAL_PARAMETERS: Additional parameters for OSV container tar scan.

πŸ’» Command

# Via docker compose wrapper
make osv-container-tar-scan

# Job Call
make _osv-container-tar-scan

πŸ•ΆοΈ Requirements

  • Container image with OSV scanner installed.

πŸ” osv-source-scan

Job for OSV scan for source code repository.

πŸ—ƒοΈ Variables

  • OSV_SOURCE_SCAN_PATH: Path of the source code repository to recursively scan.
  • OSV_SOURCE_SCAN_ADDITIONAL_PARAMETERS: Additional parameters for OSV source scan.

πŸ’» Command

# Via docker compose wrapper
make osv-source-scan

# Job Call
make _osv-source-scan

πŸ•ΆοΈ Requirements

  • Container image with OSV scanner installed.

πŸ” osv-license-scan

Job for OSV scan for source code repository licenses.

πŸ—ƒοΈ Variables

  • OSV_LICENSE_SCAN_PATH: Path of the source code repository to scan licenses.
  • OSV_LICENSE_SCAN_ADDITIONAL_PARAMETERS: Additional parameters for OSV license scan.

πŸ’» Command

# Via docker compose wrapper
make osv-license-scan

# Job Call
make _osv-license-scan

πŸ•ΆοΈ Requirements

  • Container image with OSV scanner installed.

πŸ” osv-license-scan

Job for OSV scan for source code repository licenses.

πŸ—ƒοΈ Variables

  • OSV_LICENSE_SCAN_PATH: Path of the source code repository to scan licenses.
  • OSV_LICENSE_SCAN_ADDITIONAL_PARAMETERS: Additional parameters for OSV license scan.

πŸ’» Command

# Via docker compose wrapper
make osv-license-scan

# Job Call
make _osv-license-scan

πŸ•ΆοΈ Requirements

  • Container image with OSV scanner installed.

There aren't any published security advisories