Commit 0344ed03 authored by Andres Anaya Amariels's avatar Andres Anaya Amariels 🚀
Browse files

fix: update trufflehog installation process in CI templates

parent 379c518e
Loading
Loading
Loading
Loading
+12 −4
Original line number Diff line number Diff line
@@ -24,10 +24,18 @@ dev_secrets_in_repo:
    - when: always
  script:
    - |
      cat /etc/*release
      #pip install trufflehog
      #cd ../
      #trufflehog sdk --exclude_paths sdk/cicd/exclusions --max_depth=5
      if ! command -v trufflehog >/dev/null 2>&1; then
        echo "Installing trufflehog from source..."
        git clone https://github.com/trufflesecurity/trufflehog.git
        cd trufflehog
        go install
        echo "trufflehog installed successfully: $(trufflehog --version)"
      else
        echo "trufflehog already installed: $(trufflehog --version)"
      fi

      cd ../
      trufflehog sdk --exclude_paths sdk/cicd/exclusions --max_depth=5
  <<: *dev_common

# define the process to do linting code: ruff
+12 −4
Original line number Diff line number Diff line
@@ -33,10 +33,18 @@ staging_secrets_in_repo:
  stage: staging_secrets_in_repo
  script:
    - |
      cat /etc/*release
      #pip install trufflehog
      #cd ../
      #trufflehog capif --exclude_paths capif/cicd/exclusions --max_depth=5
      if ! command -v trufflehog >/dev/null 2>&1; then
        echo "Installing trufflehog from source..."
        git clone https://github.com/trufflesecurity/trufflehog.git
        cd trufflehog
        go install
        echo "trufflehog installed successfully: $(trufflehog --version)"
      else
        echo "trufflehog already installed: $(trufflehog --version)"
      fi

      cd ../
      trufflehog sdk --exclude_paths capif/cicd/exclusions --max_depth=5
  <<: *staging_common

# define the process to do linting code: ruff