diff --git a/.github/workflows/secret-scan.yaml b/.github/workflows/secret-scan.yaml deleted file mode 100644 index fed6f0ec9b..0000000000 --- a/.github/workflows/secret-scan.yaml +++ /dev/null @@ -1,14 +0,0 @@ -name: gitleaks -on: [pull_request, push, workflow_dispatch] -jobs: - scan: - name: gitleaks - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - with: - fetch-depth: 0 - - uses: gitleaks/gitleaks-action@v2.3.4 - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - GITLEAKS_LICENSE: ${{ secrets.GITLEAKS_LICENSE }} diff --git a/.gitleaks.toml b/.gitleaks.toml deleted file mode 100644 index a73b96cb0c..0000000000 --- a/.gitleaks.toml +++ /dev/null @@ -1,6 +0,0 @@ -title = "Unified SDK gitleaks config" - -[whitelist] -exactMatch = [ - '0x7EEC32793414aAb720a90073607733d9e7B0ecD0' # Ethereum address used in Passport unit tests -] diff --git a/.husky/install_gitleaks.sh b/.husky/install_gitleaks.sh deleted file mode 100755 index a073dc64d0..0000000000 --- a/.husky/install_gitleaks.sh +++ /dev/null @@ -1,32 +0,0 @@ -#!/bin/bash - -if command -v gitleaks &> /dev/null; then - echo "gitleaks already installed" - exit 0 -fi - -# Detect the operating system -if [[ "$(uname)" == "Darwin" ]]; then - # Commands for Mac - echo "Running on macOS" - # homebrew if homebrew is installed - if command -v brew &> /dev/null; then - brew install gitleaks - exit 0 - else - echo "Homebrew not installed! Please install homebrew and try again" - echo "run the following command in your terminal" - echo "/bin/bash -c \"$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)\"" - exit 1 - fi -elif [[ "$(uname)" == "Linux" ]]; then - # Commands for Linux -# echo "Running on Linux" -# does not exist in apt -# sudo apt install gitleaks - exit 0 -else - echo "Please install gitleaks manually" - echo "https://github.com/gitleaks/gitleaks#installing" - exit 1 -fi diff --git a/.husky/run_gitleaks.sh b/.husky/run_gitleaks.sh deleted file mode 100755 index 3091dd3ef2..0000000000 --- a/.husky/run_gitleaks.sh +++ /dev/null @@ -1,14 +0,0 @@ -#!/bin/bash - -# Detect the operating system -if [[ "$(uname)" == "Darwin" ]]; then - # Commands for Mac - gitleaks protect --staged -v -elif [[ "$(uname)" == "Linux" ]]; then - # Commands for Linux - docker run -v $(pwd):/path ghcr.io/gitleaks/gitleaks:latest protect --source="/path" --staged -v -else - echo "Please install gitleaks manually" - echo "https://github.com/gitleaks/gitleaks#installing" - exit 1 -fi diff --git a/package.json b/package.json index 032f5f4a56..796db86b8e 100644 --- a/package.json +++ b/package.json @@ -37,7 +37,6 @@ "homepage": "https://github.com/immutable/ts-immutable-sdk#readme", "license": "Apache-2.0", "lint-staged": { - "*": "yarn scan:secrets", "*.{js,jsx,ts,tsx}": "eslint" }, "packageManager": "yarn@3.6.1", @@ -56,11 +55,10 @@ "lint": "nx affected -t lint --parallel=5 --no-error-on-unmatched-pattern", "lint:examples": "yarn workspaces foreach -Apt --include='@examples/**' run lint", "nx": "nx", - "postinstall": "husky install; ./.husky/install_gitleaks.sh", + "postinstall": "husky install", "prepare:examples": "yarn build:onlysdk && yarn yalc:sdk:publish && yarn workspaces foreach -Apt --include='@examples/**' exec yarn dlx yalc add @imtbl/sdk && yarn install --no-immutable", "prepare:tests": "yarn build:onlysdk && yarn yalc:sdk:publish && yarn workspaces foreach -Apt --include='@tests/**' exec yarn dlx yalc add @imtbl/sdk && yarn install --no-immutable", "release": "release-it", - "scan:secrets": "./.husky/run_gitleaks.sh", "syncpack:check": "yarn syncpack list-mismatches", "syncpack:fix": "yarn syncpack fix-mismatches", "syncpack:format": "yarn syncpack format", @@ -108,4 +106,4 @@ "tests/**" ] } -} +} \ No newline at end of file