diff --git a/.github/workflows/release_build_infisical_cli.yml b/.github/workflows/release_build_infisical_cli.yml
deleted file mode 100644
index 1c16b00b3..000000000
--- a/.github/workflows/release_build_infisical_cli.yml
+++ /dev/null
@@ -1,153 +0,0 @@
-name: Build and release CLI
-
-on:
- workflow_dispatch:
-
- push:
- # run only against tags
- tags:
- - "infisical-cli/v*.*.*"
-
-permissions:
- contents: write
-
-jobs:
- cli-integration-tests:
- name: Run tests before deployment
- uses: ./.github/workflows/run-cli-tests.yml
- secrets:
- CLI_TESTS_UA_CLIENT_ID: ${{ secrets.CLI_TESTS_UA_CLIENT_ID }}
- CLI_TESTS_UA_CLIENT_SECRET: ${{ secrets.CLI_TESTS_UA_CLIENT_SECRET }}
- CLI_TESTS_SERVICE_TOKEN: ${{ secrets.CLI_TESTS_SERVICE_TOKEN }}
- CLI_TESTS_PROJECT_ID: ${{ secrets.CLI_TESTS_PROJECT_ID }}
- CLI_TESTS_ENV_SLUG: ${{ secrets.CLI_TESTS_ENV_SLUG }}
- CLI_TESTS_USER_EMAIL: ${{ secrets.CLI_TESTS_USER_EMAIL }}
- CLI_TESTS_USER_PASSWORD: ${{ secrets.CLI_TESTS_USER_PASSWORD }}
- CLI_TESTS_INFISICAL_VAULT_FILE_PASSPHRASE: ${{ secrets.CLI_TESTS_INFISICAL_VAULT_FILE_PASSPHRASE }}
-
- npm-release:
- runs-on: ubuntu-latest
- env:
- working-directory: ./npm
- needs:
- - cli-integration-tests
- - goreleaser
- steps:
- - uses: actions/checkout@v3
- with:
- fetch-depth: 0
-
- - name: Extract version
- run: |
- VERSION=$(echo ${{ github.ref_name }} | sed 's/infisical-cli\/v//')
- echo "Version extracted: $VERSION"
- echo "CLI_VERSION=$VERSION" >> $GITHUB_ENV
-
- - name: Print version
- run: echo ${{ env.CLI_VERSION }}
-
- - name: Setup Node
- uses: actions/setup-node@8f152de45cc393bb48ce5d89d36b731f54556e65 # v4.0.0
- with:
- node-version: 20
- cache: "npm"
- cache-dependency-path: ./npm/package-lock.json
- - name: Install dependencies
- working-directory: ${{ env.working-directory }}
- run: npm install --ignore-scripts
-
- - name: Set NPM version
- working-directory: ${{ env.working-directory }}
- run: npm version ${{ env.CLI_VERSION }} --allow-same-version --no-git-tag-version
-
- - name: Setup NPM
- working-directory: ${{ env.working-directory }}
- run: |
- echo 'registry="https://registry.npmjs.org/"' > ./.npmrc
- echo "//registry.npmjs.org/:_authToken=$NPM_TOKEN" >> ./.npmrc
-
- echo 'registry="https://registry.npmjs.org/"' > ~/.npmrc
- echo "//registry.npmjs.org/:_authToken=$NPM_TOKEN" >> ~/.npmrc
- env:
- NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
-
- - name: Pack NPM
- working-directory: ${{ env.working-directory }}
- run: npm pack
-
- - name: Publish NPM
- working-directory: ${{ env.working-directory }}
- run: npm publish --tarball=./infisical-sdk-${{github.ref_name}} --access public --registry=https://registry.npmjs.org/
- env:
- NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
- NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
-
- goreleaser:
- runs-on: ubuntu-latest-8-cores
- needs: [cli-integration-tests]
- steps:
- - uses: actions/checkout@v3
- with:
- fetch-depth: 0
- - name: 🐋 Login to Docker Hub
- uses: docker/login-action@v2
- with:
- username: ${{ secrets.DOCKERHUB_USERNAME }}
- password: ${{ secrets.DOCKERHUB_TOKEN }}
- - name: 🔧 Set up Docker Buildx
- uses: docker/setup-buildx-action@v2
- - run: git fetch --force --tags
- - run: echo "Ref name ${{github.ref_name}}"
- - uses: actions/setup-go@v3
- with:
- go-version: ">=1.19.3"
- cache: true
- cache-dependency-path: cli/go.sum
- - name: Setup for libssl1.0-dev
- run: |
- echo 'deb http://security.ubuntu.com/ubuntu bionic-security main' | sudo tee -a /etc/apt/sources.list
- sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 3B4FE6ACC0B21F32
- sudo apt update
- sudo apt-get install -y libssl1.0-dev
- - name: OSXCross for CGO Support
- run: |
- mkdir ../../osxcross
- git clone https://github.com/plentico/osxcross-target.git ../../osxcross/target
- - uses: goreleaser/goreleaser-action@v4
- with:
- distribution: goreleaser-pro
- version: v1.26.2-pro
- args: release --clean
- env:
- GITHUB_TOKEN: ${{ secrets.GO_RELEASER_GITHUB_TOKEN }}
- POSTHOG_API_KEY_FOR_CLI: ${{ secrets.POSTHOG_API_KEY_FOR_CLI }}
- FURY_TOKEN: ${{ secrets.FURYPUSHTOKEN }}
- AUR_KEY: ${{ secrets.AUR_KEY }}
- GORELEASER_KEY: ${{ secrets.GORELEASER_KEY }}
- - uses: actions/setup-python@v4
- - run: pip install --upgrade cloudsmith-cli
- - uses: ruby/setup-ruby@354a1ad156761f5ee2b7b13fa8e09943a5e8d252
- with:
- ruby-version: "3.3" # Not needed with a .ruby-version, .tool-versions or mise.toml
- bundler-cache: true # runs 'bundle install' and caches installed gems automatically
- - name: Install deb-s3
- run: gem install deb-s3
- - name: Configure GPG Key
- run: echo -n "$GPG_SIGNING_KEY" | base64 --decode | gpg --batch --import
- env:
- GPG_SIGNING_KEY: ${{ secrets.GPG_SIGNING_KEY }}
- GPG_SIGNING_KEY_PASSPHRASE: ${{ secrets.GPG_SIGNING_KEY_PASSPHRASE }}
- - name: Publish to CloudSmith
- run: sh cli/upload_to_cloudsmith.sh
- env:
- CLOUDSMITH_API_KEY: ${{ secrets.CLOUDSMITH_API_KEY }}
- INFISICAL_CLI_S3_BUCKET: ${{ secrets.INFISICAL_CLI_S3_BUCKET }}
- INFISICAL_CLI_REPO_SIGNING_KEY_ID: ${{ secrets.INFISICAL_CLI_REPO_SIGNING_KEY_ID }}
- AWS_ACCESS_KEY_ID: ${{ secrets.INFISICAL_CLI_REPO_AWS_ACCESS_KEY_ID }}
- AWS_SECRET_ACCESS_KEY: ${{ secrets.INFISICAL_CLI_REPO_AWS_SECRET_ACCESS_KEY }}
- - name: Invalidate Cloudfront cache
- run: aws cloudfront create-invalidation --distribution-id $CLOUDFRONT_DISTRIBUTION_ID --paths '/deb/dists/stable/*'
- env:
- AWS_ACCESS_KEY_ID: ${{ secrets.INFISICAL_CLI_REPO_AWS_ACCESS_KEY_ID }}
- AWS_SECRET_ACCESS_KEY: ${{ secrets.INFISICAL_CLI_REPO_AWS_SECRET_ACCESS_KEY }}
- CLOUDFRONT_DISTRIBUTION_ID: ${{ secrets.INFISICAL_CLI_REPO_CLOUDFRONT_DISTRIBUTION_ID }}
diff --git a/.github/workflows/run-cli-tests.yml b/.github/workflows/run-cli-tests.yml
deleted file mode 100644
index da6f507a7..000000000
--- a/.github/workflows/run-cli-tests.yml
+++ /dev/null
@@ -1,55 +0,0 @@
-name: Go CLI Tests
-
-on:
- pull_request:
- types: [opened, synchronize]
- paths:
- - "cli/**"
-
- workflow_dispatch:
-
- workflow_call:
- secrets:
- CLI_TESTS_UA_CLIENT_ID:
- required: true
- CLI_TESTS_UA_CLIENT_SECRET:
- required: true
- CLI_TESTS_SERVICE_TOKEN:
- required: true
- CLI_TESTS_PROJECT_ID:
- required: true
- CLI_TESTS_ENV_SLUG:
- required: true
- CLI_TESTS_USER_EMAIL:
- required: true
- CLI_TESTS_USER_PASSWORD:
- required: true
- CLI_TESTS_INFISICAL_VAULT_FILE_PASSPHRASE:
- required: true
-jobs:
- test:
- defaults:
- run:
- working-directory: ./cli
- runs-on: ubuntu-latest
-
- steps:
- - uses: actions/checkout@v4
- - name: Setup Go
- uses: actions/setup-go@v4
- with:
- go-version: "1.21.x"
- - name: Install dependencies
- run: go get .
- - name: Test with the Go CLI
- env:
- CLI_TESTS_UA_CLIENT_ID: ${{ secrets.CLI_TESTS_UA_CLIENT_ID }}
- CLI_TESTS_UA_CLIENT_SECRET: ${{ secrets.CLI_TESTS_UA_CLIENT_SECRET }}
- CLI_TESTS_SERVICE_TOKEN: ${{ secrets.CLI_TESTS_SERVICE_TOKEN }}
- CLI_TESTS_PROJECT_ID: ${{ secrets.CLI_TESTS_PROJECT_ID }}
- CLI_TESTS_ENV_SLUG: ${{ secrets.CLI_TESTS_ENV_SLUG }}
- CLI_TESTS_USER_EMAIL: ${{ secrets.CLI_TESTS_USER_EMAIL }}
- CLI_TESTS_USER_PASSWORD: ${{ secrets.CLI_TESTS_USER_PASSWORD }}
- # INFISICAL_VAULT_FILE_PASSPHRASE: ${{ secrets.CLI_TESTS_INFISICAL_VAULT_FILE_PASSPHRASE }}
-
- run: go test -v -count=1 ./test
diff --git a/.goreleaser.yaml b/.goreleaser.yaml
deleted file mode 100644
index e3147d650..000000000
--- a/.goreleaser.yaml
+++ /dev/null
@@ -1,241 +0,0 @@
-# This is an example .goreleaser.yml file with some sensible defaults.
-# Make sure to check the documentation at https://goreleaser.com
-# before:
-# hooks:
-# # You may remove this if you don't use go modules.
-# - cd cli && go mod tidy
-# # you may remove this if you don't need go generate
-# - cd cli && go generate ./...
-before:
- hooks:
- - ./cli/scripts/completions.sh
- - ./cli/scripts/manpages.sh
-
-monorepo:
- tag_prefix: infisical-cli/
- dir: cli
-
-builds:
- - id: darwin-build
- binary: infisical
- ldflags:
- - -X github.com/Infisical/infisical-merge/packages/util.CLI_VERSION={{ .Version }}
- - -X github.com/Infisical/infisical-merge/packages/telemetry.POSTHOG_API_KEY_FOR_CLI={{ .Env.POSTHOG_API_KEY_FOR_CLI }}
- flags:
- - -trimpath
- env:
- - CGO_ENABLED=1
- - CC=/home/runner/work/osxcross/target/bin/o64-clang
- - CXX=/home/runner/work/osxcross/target/bin/o64-clang++
- goos:
- - darwin
- ignore:
- - goos: darwin
- goarch: "386"
- dir: ./cli
-
- - id: all-other-builds
- env:
- - CGO_ENABLED=0
- binary: infisical
- ldflags:
- - -X github.com/Infisical/infisical-merge/packages/util.CLI_VERSION={{ .Version }}
- - -X github.com/Infisical/infisical-merge/packages/telemetry.POSTHOG_API_KEY_FOR_CLI={{ .Env.POSTHOG_API_KEY_FOR_CLI }}
- flags:
- - -trimpath
- goos:
- - freebsd
- - linux
- - netbsd
- - openbsd
- - windows
- goarch:
- - "386"
- - amd64
- - arm
- - arm64
- goarm:
- - "6"
- - "7"
- ignore:
- - goos: windows
- goarch: "386"
- - goos: freebsd
- goarch: "386"
- dir: ./cli
-
-archives:
- - format_overrides:
- - goos: windows
- format: zip
- files:
- - ../README*
- - ../LICENSE*
- - ../manpages/*
- - ../completions/*
-
-release:
- replace_existing_draft: true
- mode: "replace"
-
-checksum:
- name_template: "checksums.txt"
-
-snapshot:
- name_template: "{{ .Version }}-devel"
-
-# publishers:
-# - name: fury.io
-# ids:
-# - infisical
-# dir: "{{ dir .ArtifactPath }}"
-# cmd: curl -F package=@{{ .ArtifactName }} https://{{ .Env.FURY_TOKEN }}@push.fury.io/infisical/
-
-brews:
- - name: infisical
- tap:
- owner: Infisical
- name: homebrew-get-cli
- commit_author:
- name: "Infisical"
- email: ai@infisical.com
- folder: Formula
- homepage: "https://infisical.com"
- description: "The official Infisical CLI"
- install: |-
- bin.install "infisical"
- bash_completion.install "completions/infisical.bash" => "infisical"
- zsh_completion.install "completions/infisical.zsh" => "_infisical"
- fish_completion.install "completions/infisical.fish"
- man1.install "manpages/infisical.1.gz"
- - name: "infisical@{{.Version}}"
- tap:
- owner: Infisical
- name: homebrew-get-cli
- commit_author:
- name: "Infisical"
- email: ai@infisical.com
- folder: Formula
- homepage: "https://infisical.com"
- description: "The official Infisical CLI"
- install: |-
- bin.install "infisical"
- bash_completion.install "completions/infisical.bash" => "infisical"
- zsh_completion.install "completions/infisical.zsh" => "_infisical"
- fish_completion.install "completions/infisical.fish"
- man1.install "manpages/infisical.1.gz"
-
-nfpms:
- - id: infisical
- package_name: infisical
- builds:
- - all-other-builds
- vendor: Infisical, Inc
- homepage: https://infisical.com/
- maintainer: Infisical, Inc
- description: The offical Infisical CLI
- license: MIT
- formats:
- - rpm
- - deb
- - apk
- - archlinux
- bindir: /usr/bin
- contents:
- - src: ./completions/infisical.bash
- dst: /etc/bash_completion.d/infisical
- - src: ./completions/infisical.fish
- dst: /usr/share/fish/vendor_completions.d/infisical.fish
- - src: ./completions/infisical.zsh
- dst: /usr/share/zsh/site-functions/_infisical
- - src: ./manpages/infisical.1.gz
- dst: /usr/share/man/man1/infisical.1.gz
-
-scoop:
- bucket:
- owner: Infisical
- name: scoop-infisical
- commit_author:
- name: "Infisical"
- email: ai@infisical.com
- homepage: "https://infisical.com"
- description: "The official Infisical CLI"
- license: MIT
-
-winget:
- - name: infisical
- publisher: infisical
- license: MIT
- homepage: https://infisical.com
- short_description: "The official Infisical CLI"
- repository:
- owner: infisical
- name: winget-pkgs
- branch: "infisical-{{.Version}}"
- pull_request:
- enabled: true
- draft: false
- base:
- owner: microsoft
- name: winget-pkgs
- branch: master
-
-aurs:
- - name: infisical-bin
- homepage: "https://infisical.com"
- description: "The official Infisical CLI"
- maintainers:
- - Infisical, Inc
- license: MIT
- private_key: "{{ .Env.AUR_KEY }}"
- git_url: "ssh://aur@aur.archlinux.org/infisical-bin.git"
- package: |-
- # bin
- install -Dm755 "./infisical" "${pkgdir}/usr/bin/infisical"
- # license
- install -Dm644 "./LICENSE" "${pkgdir}/usr/share/licenses/infisical/LICENSE"
- # completions
- mkdir -p "${pkgdir}/usr/share/bash-completion/completions/"
- mkdir -p "${pkgdir}/usr/share/zsh/site-functions/"
- mkdir -p "${pkgdir}/usr/share/fish/vendor_completions.d/"
- install -Dm644 "./completions/infisical.bash" "${pkgdir}/usr/share/bash-completion/completions/infisical"
- install -Dm644 "./completions/infisical.zsh" "${pkgdir}/usr/share/zsh/site-functions/_infisical"
- install -Dm644 "./completions/infisical.fish" "${pkgdir}/usr/share/fish/vendor_completions.d/infisical.fish"
- # man pages
- install -Dm644 "./manpages/infisical.1.gz" "${pkgdir}/usr/share/man/man1/infisical.1.gz"
-
-dockers:
- - dockerfile: docker/alpine
- goos: linux
- goarch: amd64
- use: buildx
- ids:
- - all-other-builds
- image_templates:
- - "infisical/cli:{{ .Major }}.{{ .Minor }}.{{ .Patch }}-amd64"
- - "infisical/cli:latest-amd64"
- build_flag_templates:
- - "--pull"
- - "--platform=linux/amd64"
- - dockerfile: docker/alpine
- goos: linux
- goarch: amd64
- use: buildx
- ids:
- - all-other-builds
- image_templates:
- - "infisical/cli:{{ .Major }}.{{ .Minor }}.{{ .Patch }}-arm64"
- - "infisical/cli:latest-arm64"
- build_flag_templates:
- - "--pull"
- - "--platform=linux/arm64"
-
-docker_manifests:
- - name_template: "infisical/cli:{{ .Major }}.{{ .Minor }}.{{ .Patch }}"
- image_templates:
- - "infisical/cli:{{ .Major }}.{{ .Minor }}.{{ .Patch }}-amd64"
- - "infisical/cli:{{ .Major }}.{{ .Minor }}.{{ .Patch }}-arm64"
- - name_template: "infisical/cli:latest"
- image_templates:
- - "infisical/cli:latest-amd64"
- - "infisical/cli:latest-arm64"
diff --git a/cli/.gitignore b/cli/.gitignore
deleted file mode 100644
index 8eb54d72b..000000000
--- a/cli/.gitignore
+++ /dev/null
@@ -1,4 +0,0 @@
-.infisical.json
-dist/
-agent-config.test.yaml
-.test.env
\ No newline at end of file
diff --git a/cli/.infisicalignore b/cli/.infisicalignore
deleted file mode 100644
index e5dfe29bc..000000000
--- a/cli/.infisicalignore
+++ /dev/null
@@ -1,3 +0,0 @@
-bea0ff6e05a4de73a5db625d4ae181a015b50855:frontend/components/utilities/attemptLogin.js:stripe-access-token:147
-bea0ff6e05a4de73a5db625d4ae181a015b50855:backend/src/json/integrations.json:generic-api-key:5
-1961b92340e5d2613acae528b886c842427ce5d0:frontend/components/utilities/attemptLogin.js:stripe-access-token:148
diff --git a/cli/agent-config.yaml b/cli/agent-config.yaml
deleted file mode 100644
index 210c21413..000000000
--- a/cli/agent-config.yaml
+++ /dev/null
@@ -1,37 +0,0 @@
-infisical:
- address: "https://app.infisical.com/"
-auth:
- type: "universal-auth"
- config:
- client-id: "./client-id"
- client-secret: "./client-secret"
- remove_client_secret_on_read: false
-sinks:
- - type: "file"
- config:
- path: "access-token"
-templates:
- - template-content: |
- {{- with secret "202f04d7-e4cb-43d4-a292-e893712d61fc" "dev" "/" }}
- {{- range . }}
- {{ .Key }}={{ .Value }}
- {{- end }}
- {{- end }}
- destination-path: my-dot-env-0.env
- config:
- polling-interval: 60s
- execute:
- command: docker-compose -f docker-compose.prod.yml down && docker-compose -f docker-compose.prod.yml up -d
-
- - base64-template-content: e3stIHdpdGggc2VjcmV0ICIyMDJmMDRkNy1lNGNiLTQzZDQtYTI5Mi1lODkzNzEyZDYxZmMiICJkZXYiICIvIiB9fQp7ey0gcmFuZ2UgLiB9fQp7eyAuS2V5IH19PXt7IC5WYWx1ZSB9fQp7ey0gZW5kIH19Cnt7LSBlbmQgfX0=
- destination-path: my-dot-env.env
- config:
- polling-interval: 60s
- execute:
- command: docker-compose -f docker-compose.prod.yml down && docker-compose -f docker-compose.prod.yml up -d
-
- - source-path: my-dot-ev-secret-template1
- destination-path: my-dot-env-1.env
- config:
- exec:
- command: mkdir hello-world1
diff --git a/cli/detect/baseline.go b/cli/detect/baseline.go
deleted file mode 100644
index eeaa2a73a..000000000
--- a/cli/detect/baseline.go
+++ /dev/null
@@ -1,103 +0,0 @@
-// MIT License
-
-// Copyright (c) 2019 Zachary Rice
-
-// Permission is hereby granted, free of charge, to any person obtaining a copy
-// of this software and associated documentation files (the "Software"), to deal
-// in the Software without restriction, including without limitation the rights
-// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-// copies of the Software, and to permit persons to whom the Software is
-// furnished to do so, subject to the following conditions:
-
-// The above copyright notice and this permission notice shall be included in all
-// copies or substantial portions of the Software.
-
-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
-// SOFTWARE.
-
-package detect
-
-import (
- "encoding/json"
- "fmt"
- "os"
- "path/filepath"
-
- "github.com/Infisical/infisical-merge/detect/report"
-)
-
-func IsNew(finding report.Finding, redact uint, baseline []report.Finding) bool {
- // Explicitly testing each property as it gives significantly better performance in comparison to cmp.Equal(). Drawback is that
- // the code requires maintenance if/when the Finding struct changes
- for _, b := range baseline {
- if finding.RuleID == b.RuleID &&
- finding.Description == b.Description &&
- finding.StartLine == b.StartLine &&
- finding.EndLine == b.EndLine &&
- finding.StartColumn == b.StartColumn &&
- finding.EndColumn == b.EndColumn &&
- (redact > 0 || (finding.Match == b.Match && finding.Secret == b.Secret)) &&
- finding.File == b.File &&
- finding.Commit == b.Commit &&
- finding.Author == b.Author &&
- finding.Email == b.Email &&
- finding.Date == b.Date &&
- finding.Message == b.Message &&
- // Omit checking finding.Fingerprint - if the format of the fingerprint changes, the users will see unexpected behaviour
- finding.Entropy == b.Entropy {
- return false
- }
- }
- return true
-}
-
-func LoadBaseline(baselinePath string) ([]report.Finding, error) {
- bytes, err := os.ReadFile(baselinePath)
- if err != nil {
- return nil, fmt.Errorf("could not open %s", baselinePath)
- }
-
- var previousFindings []report.Finding
- err = json.Unmarshal(bytes, &previousFindings)
- if err != nil {
- return nil, fmt.Errorf("the format of the file %s is not supported", baselinePath)
- }
-
- return previousFindings, nil
-}
-
-func (d *Detector) AddBaseline(baselinePath string, source string) error {
- if baselinePath != "" {
- absoluteSource, err := filepath.Abs(source)
- if err != nil {
- return err
- }
-
- absoluteBaseline, err := filepath.Abs(baselinePath)
- if err != nil {
- return err
- }
-
- relativeBaseline, err := filepath.Rel(absoluteSource, absoluteBaseline)
- if err != nil {
- return err
- }
-
- baseline, err := LoadBaseline(baselinePath)
- if err != nil {
- return err
- }
-
- d.baseline = baseline
- baselinePath = relativeBaseline
-
- }
-
- d.baselinePath = baselinePath
- return nil
-}
diff --git a/cli/detect/cmd/scm/scm.go b/cli/detect/cmd/scm/scm.go
deleted file mode 100644
index dddeffdf5..000000000
--- a/cli/detect/cmd/scm/scm.go
+++ /dev/null
@@ -1,70 +0,0 @@
-// MIT License
-
-// Copyright (c) 2019 Zachary Rice
-
-// Permission is hereby granted, free of charge, to any person obtaining a copy
-// of this software and associated documentation files (the "Software"), to deal
-// in the Software without restriction, including without limitation the rights
-// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-// copies of the Software, and to permit persons to whom the Software is
-// furnished to do so, subject to the following conditions:
-
-// The above copyright notice and this permission notice shall be included in all
-// copies or substantial portions of the Software.
-
-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
-// SOFTWARE.
-
-package scm
-
-import (
- "fmt"
- "strings"
-)
-
-type Platform int
-
-const (
- UnknownPlatform Platform = iota
- NoPlatform // Explicitly disable the feature
- GitHubPlatform
- GitLabPlatform
- AzureDevOpsPlatform
- BitBucketPlatform
- // TODO: Add others.
-)
-
-func (p Platform) String() string {
- return [...]string{
- "unknown",
- "none",
- "github",
- "gitlab",
- "azuredevops",
- "bitbucket",
- }[p]
-}
-
-func PlatformFromString(s string) (Platform, error) {
- switch strings.ToLower(s) {
- case "", "unknown":
- return UnknownPlatform, nil
- case "none":
- return NoPlatform, nil
- case "github":
- return GitHubPlatform, nil
- case "gitlab":
- return GitLabPlatform, nil
- case "azuredevops":
- return AzureDevOpsPlatform, nil
- case "bitbucket":
- return BitBucketPlatform, nil
- default:
- return UnknownPlatform, fmt.Errorf("invalid scm platform value: %s", s)
- }
-}
diff --git a/cli/detect/config/allowlist.go b/cli/detect/config/allowlist.go
deleted file mode 100644
index d91188f68..000000000
--- a/cli/detect/config/allowlist.go
+++ /dev/null
@@ -1,159 +0,0 @@
-// MIT License
-
-// Copyright (c) 2019 Zachary Rice
-
-// Permission is hereby granted, free of charge, to any person obtaining a copy
-// of this software and associated documentation files (the "Software"), to deal
-// in the Software without restriction, including without limitation the rights
-// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-// copies of the Software, and to permit persons to whom the Software is
-// furnished to do so, subject to the following conditions:
-
-// The above copyright notice and this permission notice shall be included in all
-// copies or substantial portions of the Software.
-
-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
-// SOFTWARE.
-
-package config
-
-import (
- "fmt"
- "strings"
-
- "golang.org/x/exp/maps"
-
- "github.com/Infisical/infisical-merge/detect/regexp"
-)
-
-type AllowlistMatchCondition int
-
-const (
- AllowlistMatchOr AllowlistMatchCondition = iota
- AllowlistMatchAnd
-)
-
-func (a AllowlistMatchCondition) String() string {
- return [...]string{
- "OR",
- "AND",
- }[a]
-}
-
-// Allowlist allows a rule to be ignored for specific
-// regexes, paths, and/or commits
-type Allowlist struct {
- // Short human readable description of the allowlist.
- Description string
-
- // MatchCondition determines whether all criteria must match.
- MatchCondition AllowlistMatchCondition
-
- // Commits is a slice of commit SHAs that are allowed to be ignored. Defaults to "OR".
- Commits []string
-
- // Paths is a slice of path regular expressions that are allowed to be ignored.
- Paths []*regexp.Regexp
-
- // Can be `match` or `line`.
- //
- // If `match` the _Regexes_ will be tested against the match of the _Rule.Regex_.
- //
- // If `line` the _Regexes_ will be tested against the entire line.
- //
- // If RegexTarget is empty, it will be tested against the found secret.
- RegexTarget string
-
- // Regexes is slice of content regular expressions that are allowed to be ignored.
- Regexes []*regexp.Regexp
-
- // StopWords is a slice of stop words that are allowed to be ignored.
- // This targets the _secret_, not the content of the regex match like the
- // Regexes slice.
- StopWords []string
-
- // validated is an internal flag to track whether `Validate()` has been called.
- validated bool
-}
-
-func (a *Allowlist) Validate() error {
- if a.validated {
- return nil
- }
-
- // Disallow empty allowlists.
- if len(a.Commits) == 0 &&
- len(a.Paths) == 0 &&
- len(a.Regexes) == 0 &&
- len(a.StopWords) == 0 {
- return fmt.Errorf("must contain at least one check for: commits, paths, regexes, or stopwords")
- }
-
- // Deduplicate commits and stopwords.
- if len(a.Commits) > 0 {
- uniqueCommits := make(map[string]struct{})
- for _, commit := range a.Commits {
- uniqueCommits[commit] = struct{}{}
- }
- a.Commits = maps.Keys(uniqueCommits)
- }
- if len(a.StopWords) > 0 {
- uniqueStopwords := make(map[string]struct{})
- for _, stopWord := range a.StopWords {
- uniqueStopwords[stopWord] = struct{}{}
- }
- a.StopWords = maps.Keys(uniqueStopwords)
- }
-
- a.validated = true
- return nil
-}
-
-// CommitAllowed returns true if the commit is allowed to be ignored.
-func (a *Allowlist) CommitAllowed(c string) (bool, string) {
- if a == nil || c == "" {
- return false, ""
- }
-
- for _, commit := range a.Commits {
- if commit == c {
- return true, c
- }
- }
- return false, ""
-}
-
-// PathAllowed returns true if the path is allowed to be ignored.
-func (a *Allowlist) PathAllowed(path string) bool {
- if a == nil || path == "" {
- return false
- }
- return anyRegexMatch(path, a.Paths)
-}
-
-// RegexAllowed returns true if the regex is allowed to be ignored.
-func (a *Allowlist) RegexAllowed(secret string) bool {
- if a == nil || secret == "" {
- return false
- }
- return anyRegexMatch(secret, a.Regexes)
-}
-
-func (a *Allowlist) ContainsStopWord(s string) (bool, string) {
- if a == nil || s == "" {
- return false, ""
- }
-
- s = strings.ToLower(s)
- for _, stopWord := range a.StopWords {
- if strings.Contains(s, strings.ToLower(stopWord)) {
- return true, stopWord
- }
- }
- return false, ""
-}
diff --git a/cli/detect/config/config.go b/cli/detect/config/config.go
deleted file mode 100644
index 10c6db7e0..000000000
--- a/cli/detect/config/config.go
+++ /dev/null
@@ -1,426 +0,0 @@
-// MIT License
-
-// Copyright (c) 2019 Zachary Rice
-
-// Permission is hereby granted, free of charge, to any person obtaining a copy
-// of this software and associated documentation files (the "Software"), to deal
-// in the Software without restriction, including without limitation the rights
-// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-// copies of the Software, and to permit persons to whom the Software is
-// furnished to do so, subject to the following conditions:
-
-// The above copyright notice and this permission notice shall be included in all
-// copies or substantial portions of the Software.
-
-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
-// SOFTWARE.
-
-package config
-
-import (
- _ "embed"
- "errors"
- "fmt"
- "sort"
- "strings"
-
- "github.com/spf13/viper"
-
- "github.com/Infisical/infisical-merge/detect/logging"
- "github.com/Infisical/infisical-merge/detect/regexp"
-)
-
-const DefaultScanConfigFileName = ".infisical-scan.toml"
-const DefaultScanConfigEnvName = "INFISICAL_SCAN_CONFIG"
-const DefaultInfisicalIgnoreFineName = ".infisicalignore"
-
-var (
- //go:embed gitleaks.toml
- DefaultConfig string
-
- // use to keep track of how many configs we can extend
- // yea I know, globals bad
- extendDepth int
-)
-
-const maxExtendDepth = 2
-
-// ViperConfig is the config struct used by the Viper config package
-// to parse the config file. This struct does not include regular expressions.
-// It is used as an intermediary to convert the Viper config to the Config struct.
-type ViperConfig struct {
- Title string
- Description string
- Extend Extend
- Rules []struct {
- ID string
- Description string
- Path string
- Regex string
- SecretGroup int
- Entropy float64
- Keywords []string
- Tags []string
-
- // Deprecated: this is a shim for backwards-compatibility.
- // TODO: Remove this in 9.x.
- AllowList *viperRuleAllowlist
- Allowlists []*viperRuleAllowlist
- }
- // Deprecated: this is a shim for backwards-compatibility.
- // TODO: Remove this in 9.x.
- AllowList *viperGlobalAllowlist
- Allowlists []*viperGlobalAllowlist
-}
-
-type viperRuleAllowlist struct {
- Description string
- Condition string
- Commits []string
- Paths []string
- RegexTarget string
- Regexes []string
- StopWords []string
-}
-
-type viperGlobalAllowlist struct {
- TargetRules []string
- viperRuleAllowlist `mapstructure:",squash"`
-}
-
-// Config is a configuration struct that contains rules and an allowlist if present.
-type Config struct {
- Title string
- Extend Extend
- Path string
- Description string
- Rules map[string]Rule
- Keywords map[string]struct{}
- // used to keep sarif results consistent
- OrderedRules []string
- Allowlists []*Allowlist
-}
-
-// Extend is a struct that allows users to define how they want their
-// configuration extended by other configuration files.
-type Extend struct {
- Path string
- URL string
- UseDefault bool
- DisabledRules []string
-}
-
-func (vc *ViperConfig) Translate() (Config, error) {
- var (
- keywords = make(map[string]struct{})
- orderedRules []string
- rulesMap = make(map[string]Rule)
- ruleAllowlists = make(map[string][]*Allowlist)
- )
-
- // Validate individual rules.
- for _, vr := range vc.Rules {
- var (
- pathPat *regexp.Regexp
- regexPat *regexp.Regexp
- )
- if vr.Path != "" {
- pathPat = regexp.MustCompile(vr.Path)
- }
- if vr.Regex != "" {
- regexPat = regexp.MustCompile(vr.Regex)
- }
- if vr.Keywords == nil {
- vr.Keywords = []string{}
- } else {
- for i, k := range vr.Keywords {
- keyword := strings.ToLower(k)
- keywords[keyword] = struct{}{}
- vr.Keywords[i] = keyword
- }
- }
- if vr.Tags == nil {
- vr.Tags = []string{}
- }
- cr := Rule{
- RuleID: vr.ID,
- Description: vr.Description,
- Regex: regexPat,
- SecretGroup: vr.SecretGroup,
- Entropy: vr.Entropy,
- Path: pathPat,
- Keywords: vr.Keywords,
- Tags: vr.Tags,
- }
-
- // Parse the rule allowlists, including the older format for backwards compatibility.
- if vr.AllowList != nil {
- // TODO: Remove this in v9.
- if len(vr.Allowlists) > 0 {
- return Config{}, fmt.Errorf("%s: [rules.allowlist] is deprecated, it cannot be used alongside [[rules.allowlist]]", cr.RuleID)
- }
- vr.Allowlists = append(vr.Allowlists, vr.AllowList)
- }
- for _, a := range vr.Allowlists {
- allowlist, err := parseAllowlist(a)
- if err != nil {
- return Config{}, fmt.Errorf("%s: [[rules.allowlists]] %w", cr.RuleID, err)
- }
- cr.Allowlists = append(cr.Allowlists, allowlist)
- }
- orderedRules = append(orderedRules, cr.RuleID)
- rulesMap[cr.RuleID] = cr
- }
-
- // Assemble the config.
- c := Config{
- Title: vc.Title,
- Description: vc.Description,
- Extend: vc.Extend,
- Rules: rulesMap,
- Keywords: keywords,
- OrderedRules: orderedRules,
- }
- // Parse the config allowlists, including the older format for backwards compatibility.
- if vc.AllowList != nil {
- // TODO: Remove this in v9.
- if len(vc.Allowlists) > 0 {
- return Config{}, errors.New("[allowlist] is deprecated, it cannot be used alongside [[allowlists]]")
- }
- vc.Allowlists = append(vc.Allowlists, vc.AllowList)
- }
- for _, a := range vc.Allowlists {
- allowlist, err := parseAllowlist(&a.viperRuleAllowlist)
- if err != nil {
- return Config{}, fmt.Errorf("[[allowlists]] %w", err)
- }
- // Allowlists with |targetRules| aren't added to the global list.
- if len(a.TargetRules) > 0 {
- for _, ruleID := range a.TargetRules {
- // It's not possible to validate |ruleID| until after extend.
- ruleAllowlists[ruleID] = append(ruleAllowlists[ruleID], allowlist)
- }
- } else {
- c.Allowlists = append(c.Allowlists, allowlist)
- }
- }
-
- if maxExtendDepth != extendDepth {
- // disallow both usedefault and path from being set
- if c.Extend.Path != "" && c.Extend.UseDefault {
- return Config{}, errors.New("unable to load config due to extend.path and extend.useDefault being set")
- }
- if c.Extend.UseDefault {
- if err := c.extendDefault(); err != nil {
- return Config{}, err
- }
- } else if c.Extend.Path != "" {
- if err := c.extendPath(); err != nil {
- return Config{}, err
- }
- }
- }
-
- // Validate the rules after everything has been assembled (including extended configs).
- if extendDepth == 0 {
- for _, rule := range c.Rules {
- if err := rule.Validate(); err != nil {
- return Config{}, err
- }
- }
-
- // Populate targeted configs.
- for ruleID, allowlists := range ruleAllowlists {
- rule, ok := c.Rules[ruleID]
- if !ok {
- return Config{}, fmt.Errorf("[[allowlists]] target rule ID '%s' does not exist", ruleID)
- }
- rule.Allowlists = append(rule.Allowlists, allowlists...)
- c.Rules[ruleID] = rule
- }
- }
-
- return c, nil
-}
-
-func parseAllowlist(a *viperRuleAllowlist) (*Allowlist, error) {
- var matchCondition AllowlistMatchCondition
- switch strings.ToUpper(a.Condition) {
- case "AND", "&&":
- matchCondition = AllowlistMatchAnd
- case "", "OR", "||":
- matchCondition = AllowlistMatchOr
- default:
- return nil, fmt.Errorf("unknown allowlist |condition| '%s' (expected 'and', 'or')", a.Condition)
- }
-
- // Validate the target.
- regexTarget := a.RegexTarget
- if regexTarget != "" {
- switch regexTarget {
- case "secret":
- regexTarget = ""
- case "match", "line":
- // do nothing
- default:
- return nil, fmt.Errorf("unknown allowlist |regexTarget| '%s' (expected 'match', 'line')", regexTarget)
- }
- }
- var allowlistRegexes []*regexp.Regexp
- for _, a := range a.Regexes {
- allowlistRegexes = append(allowlistRegexes, regexp.MustCompile(a))
- }
- var allowlistPaths []*regexp.Regexp
- for _, a := range a.Paths {
- allowlistPaths = append(allowlistPaths, regexp.MustCompile(a))
- }
-
- allowlist := &Allowlist{
- Description: a.Description,
- MatchCondition: matchCondition,
- Commits: a.Commits,
- Paths: allowlistPaths,
- RegexTarget: regexTarget,
- Regexes: allowlistRegexes,
- StopWords: a.StopWords,
- }
- if err := allowlist.Validate(); err != nil {
- return nil, err
- }
- return allowlist, nil
-}
-
-func (c *Config) GetOrderedRules() []Rule {
- var orderedRules []Rule
- for _, id := range c.OrderedRules {
- if _, ok := c.Rules[id]; ok {
- orderedRules = append(orderedRules, c.Rules[id])
- }
- }
- return orderedRules
-}
-
-func (c *Config) extendDefault() error {
- extendDepth++
- viper.SetConfigType("toml")
- if err := viper.ReadConfig(strings.NewReader(DefaultConfig)); err != nil {
- return fmt.Errorf("failed to load extended default config, err: %w", err)
- }
- defaultViperConfig := ViperConfig{}
- if err := viper.Unmarshal(&defaultViperConfig); err != nil {
- return fmt.Errorf("failed to load extended default config, err: %w", err)
- }
- cfg, err := defaultViperConfig.Translate()
- if err != nil {
- return fmt.Errorf("failed to load extended default config, err: %w", err)
-
- }
- logging.Debug().Msg("extending config with default config")
- c.extend(cfg)
- return nil
-}
-
-func (c *Config) extendPath() error {
- extendDepth++
- viper.SetConfigFile(c.Extend.Path)
- if err := viper.ReadInConfig(); err != nil {
- return fmt.Errorf("failed to load extended config, err: %w", err)
- }
- extensionViperConfig := ViperConfig{}
- if err := viper.Unmarshal(&extensionViperConfig); err != nil {
- return fmt.Errorf("failed to load extended config, err: %w", err)
- }
- cfg, err := extensionViperConfig.Translate()
- if err != nil {
- return fmt.Errorf("failed to load extended config, err: %w", err)
- }
- logging.Debug().Msgf("extending config with %s", c.Extend.Path)
- c.extend(cfg)
- return nil
-}
-
-func (c *Config) extendURL() {
- // TODO
-}
-
-func (c *Config) extend(extensionConfig Config) {
- // Get config name for helpful log messages.
- var configName string
- if c.Extend.Path != "" {
- configName = c.Extend.Path
- } else {
- configName = "default"
- }
- // Convert |Config.DisabledRules| into a map for ease of access.
- disabledRuleIDs := map[string]struct{}{}
- for _, id := range c.Extend.DisabledRules {
- if _, ok := extensionConfig.Rules[id]; !ok {
- logging.Warn().
- Str("rule-id", id).
- Str("config", configName).
- Msg("Disabled rule doesn't exist in extended config.")
- }
- disabledRuleIDs[id] = struct{}{}
- }
-
- for ruleID, baseRule := range extensionConfig.Rules {
- // Skip the rule.
- if _, ok := disabledRuleIDs[ruleID]; ok {
- logging.Debug().
- Str("rule-id", ruleID).
- Str("config", configName).
- Msg("Ignoring rule from extended config.")
- continue
- }
-
- currentRule, ok := c.Rules[ruleID]
- if !ok {
- // Rule doesn't exist, add it to the config.
- c.Rules[ruleID] = baseRule
- for _, k := range baseRule.Keywords {
- c.Keywords[k] = struct{}{}
- }
- c.OrderedRules = append(c.OrderedRules, ruleID)
- } else {
- // Rule exists, merge our changes into the base.
- if currentRule.Description != "" {
- baseRule.Description = currentRule.Description
- }
- if currentRule.Entropy != 0 {
- baseRule.Entropy = currentRule.Entropy
- }
- if currentRule.SecretGroup != 0 {
- baseRule.SecretGroup = currentRule.SecretGroup
- }
- if currentRule.Regex != nil {
- baseRule.Regex = currentRule.Regex
- }
- if currentRule.Path != nil {
- baseRule.Path = currentRule.Path
- }
- baseRule.Tags = append(baseRule.Tags, currentRule.Tags...)
- baseRule.Keywords = append(baseRule.Keywords, currentRule.Keywords...)
- for _, a := range currentRule.Allowlists {
- baseRule.Allowlists = append(baseRule.Allowlists, a)
- }
- // The keywords from the base rule and the extended rule must be merged into the global keywords list
- for _, k := range baseRule.Keywords {
- c.Keywords[k] = struct{}{}
- }
- c.Rules[ruleID] = baseRule
- }
- }
-
- // append allowlists, not attempting to merge
- for _, a := range extensionConfig.Allowlists {
- c.Allowlists = append(c.Allowlists, a)
- }
-
- // sort to keep extended rules in order
- sort.Strings(c.OrderedRules)
-}
diff --git a/cli/detect/config/gitleaks.toml b/cli/detect/config/gitleaks.toml
deleted file mode 100644
index 92a06a319..000000000
--- a/cli/detect/config/gitleaks.toml
+++ /dev/null
@@ -1,3130 +0,0 @@
-# This file has been auto-generated. Do not edit manually.
-# If you would like to contribute new rules, please use
-# cmd/generate/config/main.go and follow the contributing guidelines
-# at https://github.com/gitleaks/gitleaks/blob/master/CONTRIBUTING.md
-#
-# How the hell does secret scanning work? Read this:
-# https://lookingatcomputer.substack.com/p/regex-is-almost-all-you-need
-#
-# This is the default gitleaks configuration file.
-# Rules and allowlists are defined within this file.
-# Rules instruct gitleaks on what should be considered a secret.
-# Allowlists instruct gitleaks on what is allowed, i.e. not a secret.
-
-title = "gitleaks config"
-
-# TODO: change to [[allowlists]]
-[allowlist]
-description = "global allow lists"
-paths = [
- '''gitleaks\.toml''',
- '''(?i)\.(?:bmp|gif|jpe?g|png|svg|tiff?)$''',
- '''(?i)\.(?:eot|[ot]tf|woff2?)$''',
- '''(?i)\.(?:docx?|xlsx?|pdf|bin|socket|vsidx|v2|suo|wsuo|.dll|pdb|exe|gltf|zip)$''',
- '''go\.(?:mod|sum|work(?:\.sum)?)$''',
- '''(?:^|/)vendor/modules\.txt$''',
- '''(?:^|/)vendor/(?:github\.com|golang\.org/x|google\.golang\.org|gopkg\.in|istio\.io|k8s\.io|sigs\.k8s\.io)(?:/.*)?$''',
- '''(?:^|/)gradlew(?:\.bat)?$''',
- '''(?:^|/)gradle\.lockfile$''',
- '''(?:^|/)mvnw(?:\.cmd)?$''',
- '''(?:^|/)\.mvn/wrapper/MavenWrapperDownloader\.java$''',
- '''(?:^|/)node_modules(?:/.*)?$''',
- '''(?:^|/)(?:deno\.lock|npm-shrinkwrap\.json|package-lock\.json|pnpm-lock\.yaml|yarn\.lock)$''',
- '''(?:^|/)bower_components(?:/.*)?$''',
- '''(?:^|/)(?:angular|bootstrap|jquery(?:-?ui)?|plotly|swagger-?ui)[a-zA-Z0-9.-]*(?:\.min)?\.js(?:\.map)?$''',
- '''(?:^|/)javascript\.json$''',
- '''(?:^|/)(?:Pipfile|poetry)\.lock$''',
- '''(?i)(?:^|/)(?:v?env|virtualenv)/lib(?:64)?(?:/.*)?$''',
- '''(?i)(?:^|/)(?:lib(?:64)?/python[23](?:\.\d{1,2})+|python/[23](?:\.\d{1,2})+/lib(?:64)?)(?:/.*)?$''',
- '''(?i)(?:^|/)[a-z0-9_.]+-[0-9.]+\.dist-info(?:/.+)?$''',
- '''(?:^|/)vendor/(?:bundle|ruby)(?:/.*?)?$''',
- '''\.gem$''',
- '''verification-metadata\.xml''',
- '''Database.refactorlog''',
-]
-regexes = [
- '''(?i)^true|false|null$''',
- '''^(?i:a+|b+|c+|d+|e+|f+|g+|h+|i+|j+|k+|l+|m+|n+|o+|p+|q+|r+|s+|t+|u+|v+|w+|x+|y+|z+|\*+|\.+)$''',
- '''^\$(?:\d+|{\d+})$''',
- '''^\$(?:[A-Z_]+|[a-z_]+)$''',
- '''^\${(?:[A-Z_]+|[a-z_]+)}$''',
- '''^\{\{[ \t]*[\w ().|]+[ \t]*}}$''',
- '''^\$\{\{[ \t]*(?:(?:env|github|secrets|vars)(?:\.[A-Za-z]\w+)+[\w "'&./=|]*)[ \t]*}}$''',
- '''^%(?:[A-Z_]+|[a-z_]+)%$''',
- '''^%[+\-# 0]?[bcdeEfFgGoOpqstTUvxX]$''',
- '''^\{\d{0,2}}$''',
- '''^@(?:[A-Z_]+|[a-z_]+)@$''',
- '''^/Users/(?i)[a-z0-9]+/[\w .-/]+$''',
- '''^/(?:bin|etc|home|opt|tmp|usr|var)/[\w ./-]+$''',
-]
-stopwords = [
- "abcdefghijklmnopqrstuvwxyz",
- "014df517-39d1-4453-b7b3-9930c563627c",
-]
-
-[[rules]]
-id = "1password-secret-key"
-description = "Uncovered a possible 1Password secret key, potentially compromising access to secrets in vaults."
-regex = '''\bA3-[A-Z0-9]{6}-(?:(?:[A-Z0-9]{11})|(?:[A-Z0-9]{6}-[A-Z0-9]{5}))-[A-Z0-9]{5}-[A-Z0-9]{5}-[A-Z0-9]{5}\b'''
-entropy = 3.8
-keywords = ["a3-"]
-
-[[rules]]
-id = "1password-service-account-token"
-description = "Uncovered a possible 1Password service account token, potentially compromising access to secrets in vaults."
-regex = '''ops_eyJ[a-zA-Z0-9+/]{250,}={0,3}'''
-entropy = 4
-keywords = ["ops_"]
-
-[[rules]]
-id = "adafruit-api-key"
-description = "Identified a potential Adafruit API Key, which could lead to unauthorized access to Adafruit services and sensitive data exposure."
-regex = '''(?i)[\w.-]{0,50}?(?:adafruit)(?:[ \t\w.-]{0,20})[\s'"]{0,3}(?:=|>|:{1,3}=|\|\||:|=>|\?=|,)[\x60'"\s=]{0,5}([a-z0-9_-]{32})(?:[\x60'"\s;]|\\[nr]|$)'''
-keywords = ["adafruit"]
-
-[[rules]]
-id = "adobe-client-id"
-description = "Detected a pattern that resembles an Adobe OAuth Web Client ID, posing a risk of compromised Adobe integrations and data breaches."
-regex = '''(?i)[\w.-]{0,50}?(?:adobe)(?:[ \t\w.-]{0,20})[\s'"]{0,3}(?:=|>|:{1,3}=|\|\||:|=>|\?=|,)[\x60'"\s=]{0,5}([a-f0-9]{32})(?:[\x60'"\s;]|\\[nr]|$)'''
-entropy = 2
-keywords = ["adobe"]
-
-[[rules]]
-id = "adobe-client-secret"
-description = "Discovered a potential Adobe Client Secret, which, if exposed, could allow unauthorized Adobe service access and data manipulation."
-regex = '''\b(p8e-(?i)[a-z0-9]{32})(?:[\x60'"\s;]|\\[nr]|$)'''
-entropy = 2
-keywords = ["p8e-"]
-
-[[rules]]
-id = "age-secret-key"
-description = "Discovered a potential Age encryption tool secret key, risking data decryption and unauthorized access to sensitive information."
-regex = '''AGE-SECRET-KEY-1[QPZRY9X8GF2TVDW0S3JN54KHCE6MUA7L]{58}'''
-keywords = ["age-secret-key-1"]
-
-[[rules]]
-id = "airtable-api-key"
-description = "Uncovered a possible Airtable API Key, potentially compromising database access and leading to data leakage or alteration."
-regex = '''(?i)[\w.-]{0,50}?(?:airtable)(?:[ \t\w.-]{0,20})[\s'"]{0,3}(?:=|>|:{1,3}=|\|\||:|=>|\?=|,)[\x60'"\s=]{0,5}([a-z0-9]{17})(?:[\x60'"\s;]|\\[nr]|$)'''
-keywords = ["airtable"]
-
-[[rules]]
-id = "algolia-api-key"
-description = "Identified an Algolia API Key, which could result in unauthorized search operations and data exposure on Algolia-managed platforms."
-regex = '''(?i)[\w.-]{0,50}?(?:algolia)(?:[ \t\w.-]{0,20})[\s'"]{0,3}(?:=|>|:{1,3}=|\|\||:|=>|\?=|,)[\x60'"\s=]{0,5}([a-z0-9]{32})(?:[\x60'"\s;]|\\[nr]|$)'''
-keywords = ["algolia"]
-
-[[rules]]
-id = "alibaba-access-key-id"
-description = "Detected an Alibaba Cloud AccessKey ID, posing a risk of unauthorized cloud resource access and potential data compromise."
-regex = '''\b(LTAI(?i)[a-z0-9]{20})(?:[\x60'"\s;]|\\[nr]|$)'''
-entropy = 2
-keywords = ["ltai"]
-
-[[rules]]
-id = "alibaba-secret-key"
-description = "Discovered a potential Alibaba Cloud Secret Key, potentially allowing unauthorized operations and data access within Alibaba Cloud."
-regex = '''(?i)[\w.-]{0,50}?(?:alibaba)(?:[ \t\w.-]{0,20})[\s'"]{0,3}(?:=|>|:{1,3}=|\|\||:|=>|\?=|,)[\x60'"\s=]{0,5}([a-z0-9]{30})(?:[\x60'"\s;]|\\[nr]|$)'''
-entropy = 2
-keywords = ["alibaba"]
-
-[[rules]]
-id = "asana-client-id"
-description = "Discovered a potential Asana Client ID, risking unauthorized access to Asana projects and sensitive task information."
-regex = '''(?i)[\w.-]{0,50}?(?:asana)(?:[ \t\w.-]{0,20})[\s'"]{0,3}(?:=|>|:{1,3}=|\|\||:|=>|\?=|,)[\x60'"\s=]{0,5}([0-9]{16})(?:[\x60'"\s;]|\\[nr]|$)'''
-keywords = ["asana"]
-
-[[rules]]
-id = "asana-client-secret"
-description = "Identified an Asana Client Secret, which could lead to compromised project management integrity and unauthorized access."
-regex = '''(?i)[\w.-]{0,50}?(?:asana)(?:[ \t\w.-]{0,20})[\s'"]{0,3}(?:=|>|:{1,3}=|\|\||:|=>|\?=|,)[\x60'"\s=]{0,5}([a-z0-9]{32})(?:[\x60'"\s;]|\\[nr]|$)'''
-keywords = ["asana"]
-
-[[rules]]
-id = "atlassian-api-token"
-description = "Detected an Atlassian API token, posing a threat to project management and collaboration tool security and data confidentiality."
-regex = '''[\w.-]{0,50}?(?i:[\w.-]{0,50}?(?:atlassian|confluence|jira)(?:[ \t\w.-]{0,20})[\s'"]{0,3})(?:=|>|:{1,3}=|\|\||:|=>|\?=|,)[\x60'"\s=]{0,5}([a-zA-Z0-9]{24})(?:[\x60'"\s;]|\\[nr]|$)|\b(ATATT3[A-Za-z0-9_\-=]{186})(?:[\x60'"\s;]|\\[nr]|$)'''
-entropy = 3.5
-keywords = [
- "atlassian",
- "confluence",
- "jira",
- "atatt3",
-]
-
-[[rules]]
-id = "authress-service-client-access-key"
-description = "Uncovered a possible Authress Service Client Access Key, which may compromise access control services and sensitive data."
-regex = '''\b((?:sc|ext|scauth|authress)_(?i)[a-z0-9]{5,30}\.[a-z0-9]{4,6}\.(?-i:acc)[_-][a-z0-9-]{10,32}\.[a-z0-9+/_=-]{30,120})(?:[\x60'"\s;]|\\[nr]|$)'''
-entropy = 2
-keywords = [
- "sc_",
- "ext_",
- "scauth_",
- "authress_",
-]
-
-[[rules]]
-id = "aws-access-token"
-description = "Identified a pattern that may indicate AWS credentials, risking unauthorized cloud resource access and data breaches on AWS platforms."
-regex = '''\b((?:A3T[A-Z0-9]|AKIA|ASIA|ABIA|ACCA)[A-Z0-9]{16})\b'''
-entropy = 3
-keywords = [
- "a3t",
- "akia",
- "asia",
- "abia",
- "acca",
-]
-[[rules.allowlists]]
-regexes = [
- '''.+EXAMPLE$''',
-]
-
-[[rules]]
-id = "azure-ad-client-secret"
-description = "Azure AD Client Secret"
-regex = '''(?:^|[\\'"\x60\s>=:(,)])([a-zA-Z0-9_~.]{3}\dQ~[a-zA-Z0-9_~.-]{31,34})(?:$|[\\'"\x60\s<),])'''
-entropy = 3
-keywords = ["q~"]
-
-[[rules]]
-id = "beamer-api-token"
-description = "Detected a Beamer API token, potentially compromising content management and exposing sensitive notifications and updates."
-regex = '''(?i)[\w.-]{0,50}?(?:beamer)(?:[ \t\w.-]{0,20})[\s'"]{0,3}(?:=|>|:{1,3}=|\|\||:|=>|\?=|,)[\x60'"\s=]{0,5}(b_[a-z0-9=_\-]{44})(?:[\x60'"\s;]|\\[nr]|$)'''
-keywords = ["beamer"]
-
-[[rules]]
-id = "bitbucket-client-id"
-description = "Discovered a potential Bitbucket Client ID, risking unauthorized repository access and potential codebase exposure."
-regex = '''(?i)[\w.-]{0,50}?(?:bitbucket)(?:[ \t\w.-]{0,20})[\s'"]{0,3}(?:=|>|:{1,3}=|\|\||:|=>|\?=|,)[\x60'"\s=]{0,5}([a-z0-9]{32})(?:[\x60'"\s;]|\\[nr]|$)'''
-keywords = ["bitbucket"]
-
-[[rules]]
-id = "bitbucket-client-secret"
-description = "Discovered a potential Bitbucket Client Secret, posing a risk of compromised code repositories and unauthorized access."
-regex = '''(?i)[\w.-]{0,50}?(?:bitbucket)(?:[ \t\w.-]{0,20})[\s'"]{0,3}(?:=|>|:{1,3}=|\|\||:|=>|\?=|,)[\x60'"\s=]{0,5}([a-z0-9=_\-]{64})(?:[\x60'"\s;]|\\[nr]|$)'''
-keywords = ["bitbucket"]
-
-[[rules]]
-id = "bittrex-access-key"
-description = "Identified a Bittrex Access Key, which could lead to unauthorized access to cryptocurrency trading accounts and financial loss."
-regex = '''(?i)[\w.-]{0,50}?(?:bittrex)(?:[ \t\w.-]{0,20})[\s'"]{0,3}(?:=|>|:{1,3}=|\|\||:|=>|\?=|,)[\x60'"\s=]{0,5}([a-z0-9]{32})(?:[\x60'"\s;]|\\[nr]|$)'''
-keywords = ["bittrex"]
-
-[[rules]]
-id = "bittrex-secret-key"
-description = "Detected a Bittrex Secret Key, potentially compromising cryptocurrency transactions and financial security."
-regex = '''(?i)[\w.-]{0,50}?(?:bittrex)(?:[ \t\w.-]{0,20})[\s'"]{0,3}(?:=|>|:{1,3}=|\|\||:|=>|\?=|,)[\x60'"\s=]{0,5}([a-z0-9]{32})(?:[\x60'"\s;]|\\[nr]|$)'''
-keywords = ["bittrex"]
-
-[[rules]]
-id = "cisco-meraki-api-key"
-description = "Cisco Meraki is a cloud-managed IT solution that provides networking, security, and device management through an easy-to-use interface."
-regex = '''[\w.-]{0,50}?(?i:[\w.-]{0,50}?(?:(?-i:[Mm]eraki|MERAKI))(?:[ \t\w.-]{0,20})[\s'"]{0,3})(?:=|>|:{1,3}=|\|\||:|=>|\?=|,)[\x60'"\s=]{0,5}([0-9a-f]{40})(?:[\x60'"\s;]|\\[nr]|$)'''
-entropy = 3
-keywords = ["meraki"]
-
-[[rules]]
-id = "clickhouse-cloud-api-secret-key"
-description = "Identified a pattern that may indicate clickhouse cloud API secret key, risking unauthorized clickhouse cloud api access and data breaches on ClickHouse Cloud platforms."
-regex = '''\b(4b1d[A-Za-z0-9]{38})\b'''
-entropy = 3
-keywords = ["4b1d"]
-
-[[rules]]
-id = "clojars-api-token"
-description = "Uncovered a possible Clojars API token, risking unauthorized access to Clojure libraries and potential code manipulation."
-regex = '''(?i)CLOJARS_[a-z0-9]{60}'''
-entropy = 2
-keywords = ["clojars_"]
-
-[[rules]]
-id = "cloudflare-api-key"
-description = "Detected a Cloudflare API Key, potentially compromising cloud application deployments and operational security."
-regex = '''(?i)[\w.-]{0,50}?(?:cloudflare)(?:[ \t\w.-]{0,20})[\s'"]{0,3}(?:=|>|:{1,3}=|\|\||:|=>|\?=|,)[\x60'"\s=]{0,5}([a-z0-9_-]{40})(?:[\x60'"\s;]|\\[nr]|$)'''
-entropy = 2
-keywords = ["cloudflare"]
-
-[[rules]]
-id = "cloudflare-global-api-key"
-description = "Detected a Cloudflare Global API Key, potentially compromising cloud application deployments and operational security."
-regex = '''(?i)[\w.-]{0,50}?(?:cloudflare)(?:[ \t\w.-]{0,20})[\s'"]{0,3}(?:=|>|:{1,3}=|\|\||:|=>|\?=|,)[\x60'"\s=]{0,5}([a-f0-9]{37})(?:[\x60'"\s;]|\\[nr]|$)'''
-entropy = 2
-keywords = ["cloudflare"]
-
-[[rules]]
-id = "cloudflare-origin-ca-key"
-description = "Detected a Cloudflare Origin CA Key, potentially compromising cloud application deployments and operational security."
-regex = '''\b(v1\.0-[a-f0-9]{24}-[a-f0-9]{146})(?:[\x60'"\s;]|\\[nr]|$)'''
-entropy = 2
-keywords = [
- "cloudflare",
- "v1.0-",
-]
-
-[[rules]]
-id = "codecov-access-token"
-description = "Found a pattern resembling a Codecov Access Token, posing a risk of unauthorized access to code coverage reports and sensitive data."
-regex = '''(?i)[\w.-]{0,50}?(?:codecov)(?:[ \t\w.-]{0,20})[\s'"]{0,3}(?:=|>|:{1,3}=|\|\||:|=>|\?=|,)[\x60'"\s=]{0,5}([a-z0-9]{32})(?:[\x60'"\s;]|\\[nr]|$)'''
-keywords = ["codecov"]
-
-[[rules]]
-id = "cohere-api-token"
-description = "Identified a Cohere Token, posing a risk of unauthorized access to AI services and data manipulation."
-regex = '''[\w.-]{0,50}?(?i:[\w.-]{0,50}?(?:cohere|CO_API_KEY)(?:[ \t\w.-]{0,20})[\s'"]{0,3})(?:=|>|:{1,3}=|\|\||:|=>|\?=|,)[\x60'"\s=]{0,5}([a-zA-Z0-9]{40})(?:[\x60'"\s;]|\\[nr]|$)'''
-entropy = 4
-keywords = [
- "cohere",
- "co_api_key",
-]
-
-[[rules]]
-id = "coinbase-access-token"
-description = "Detected a Coinbase Access Token, posing a risk of unauthorized access to cryptocurrency accounts and financial transactions."
-regex = '''(?i)[\w.-]{0,50}?(?:coinbase)(?:[ \t\w.-]{0,20})[\s'"]{0,3}(?:=|>|:{1,3}=|\|\||:|=>|\?=|,)[\x60'"\s=]{0,5}([a-z0-9_-]{64})(?:[\x60'"\s;]|\\[nr]|$)'''
-keywords = ["coinbase"]
-
-[[rules]]
-id = "confluent-access-token"
-description = "Identified a Confluent Access Token, which could compromise access to streaming data platforms and sensitive data flow."
-regex = '''(?i)[\w.-]{0,50}?(?:confluent)(?:[ \t\w.-]{0,20})[\s'"]{0,3}(?:=|>|:{1,3}=|\|\||:|=>|\?=|,)[\x60'"\s=]{0,5}([a-z0-9]{16})(?:[\x60'"\s;]|\\[nr]|$)'''
-keywords = ["confluent"]
-
-[[rules]]
-id = "confluent-secret-key"
-description = "Found a Confluent Secret Key, potentially risking unauthorized operations and data access within Confluent services."
-regex = '''(?i)[\w.-]{0,50}?(?:confluent)(?:[ \t\w.-]{0,20})[\s'"]{0,3}(?:=|>|:{1,3}=|\|\||:|=>|\?=|,)[\x60'"\s=]{0,5}([a-z0-9]{64})(?:[\x60'"\s;]|\\[nr]|$)'''
-keywords = ["confluent"]
-
-[[rules]]
-id = "contentful-delivery-api-token"
-description = "Discovered a Contentful delivery API token, posing a risk to content management systems and data integrity."
-regex = '''(?i)[\w.-]{0,50}?(?:contentful)(?:[ \t\w.-]{0,20})[\s'"]{0,3}(?:=|>|:{1,3}=|\|\||:|=>|\?=|,)[\x60'"\s=]{0,5}([a-z0-9=_\-]{43})(?:[\x60'"\s;]|\\[nr]|$)'''
-keywords = ["contentful"]
-
-[[rules]]
-id = "curl-auth-header"
-description = "Discovered a potential authorization token provided in a curl command header, which could compromise the curl accessed resource."
-regex = '''\bcurl\b(?:.*?|.*?(?:[\r\n]{1,2}.*?){1,5})[ \t\n\r](?:-H|--header)(?:=|[ \t]{0,5})(?:"(?i)(?:Authorization:[ \t]{0,5}(?:Basic[ \t]([a-z0-9+/]{8,}={0,3})|(?:Bearer|(?:Api-)?Token)[ \t]([\w=~@.+/-]{8,})|([\w=~@.+/-]{8,}))|(?:(?:X-(?:[a-z]+-)?)?(?:Api-?)?(?:Key|Token)):[ \t]{0,5}([\w=~@.+/-]{8,}))"|'(?i)(?:Authorization:[ \t]{0,5}(?:Basic[ \t]([a-z0-9+/]{8,}={0,3})|(?:Bearer|(?:Api-)?Token)[ \t]([\w=~@.+/-]{8,})|([\w=~@.+/-]{8,}))|(?:(?:X-(?:[a-z]+-)?)?(?:Api-?)?(?:Key|Token)):[ \t]{0,5}([\w=~@.+/-]{8,}))')(?:\B|\s|\z)'''
-entropy = 2.75
-keywords = ["curl"]
-
-[[rules]]
-id = "curl-auth-user"
-description = "Discovered a potential basic authorization token provided in a curl command, which could compromise the curl accessed resource."
-regex = '''\bcurl\b(?:.*|.*(?:[\r\n]{1,2}.*){1,5})[ \t\n\r](?:-u|--user)(?:=|[ \t]{0,5})("(:[^"]{3,}|[^:"]{3,}:|[^:"]{3,}:[^"]{3,})"|'([^:']{3,}:[^']{3,})'|((?:"[^"]{3,}"|'[^']{3,}'|[\w$@.-]+):(?:"[^"]{3,}"|'[^']{3,}'|[\w${}@.-]+)))(?:\s|\z)'''
-entropy = 2
-keywords = ["curl"]
-[[rules.allowlists]]
-regexes = [
- '''[^:]+:(?:change(?:it|me)|pass(?:word)?|pwd|test|token|\*+|x+)''',
- '''['"]?<[^>]+>['"]?:['"]?<[^>]+>|<[^:]+:[^>]+>['"]?''',
- '''[^:]+:\[[^]]+]''',
- '''['"]?[^:]+['"]?:['"]?\$(?:\d|\w+|\{(?:\d|\w+)})['"]?''',
- '''\$\([^)]+\):\$\([^)]+\)''',
- '''['"]?\$?{{[^}]+}}['"]?:['"]?\$?{{[^}]+}}['"]?''',
-]
-
-[[rules]]
-id = "databricks-api-token"
-description = "Uncovered a Databricks API token, which may compromise big data analytics platforms and sensitive data processing."
-regex = '''\b(dapi[a-f0-9]{32}(?:-\d)?)(?:[\x60'"\s;]|\\[nr]|$)'''
-entropy = 3
-keywords = ["dapi"]
-
-[[rules]]
-id = "datadog-access-token"
-description = "Detected a Datadog Access Token, potentially risking monitoring and analytics data exposure and manipulation."
-regex = '''(?i)[\w.-]{0,50}?(?:datadog)(?:[ \t\w.-]{0,20})[\s'"]{0,3}(?:=|>|:{1,3}=|\|\||:|=>|\?=|,)[\x60'"\s=]{0,5}([a-z0-9]{40})(?:[\x60'"\s;]|\\[nr]|$)'''
-keywords = ["datadog"]
-
-[[rules]]
-id = "defined-networking-api-token"
-description = "Identified a Defined Networking API token, which could lead to unauthorized network operations and data breaches."
-regex = '''(?i)[\w.-]{0,50}?(?:dnkey)(?:[ \t\w.-]{0,20})[\s'"]{0,3}(?:=|>|:{1,3}=|\|\||:|=>|\?=|,)[\x60'"\s=]{0,5}(dnkey-[a-z0-9=_\-]{26}-[a-z0-9=_\-]{52})(?:[\x60'"\s;]|\\[nr]|$)'''
-keywords = ["dnkey"]
-
-[[rules]]
-id = "digitalocean-access-token"
-description = "Found a DigitalOcean OAuth Access Token, risking unauthorized cloud resource access and data compromise."
-regex = '''\b(doo_v1_[a-f0-9]{64})(?:[\x60'"\s;]|\\[nr]|$)'''
-entropy = 3
-keywords = ["doo_v1_"]
-
-[[rules]]
-id = "digitalocean-pat"
-description = "Discovered a DigitalOcean Personal Access Token, posing a threat to cloud infrastructure security and data privacy."
-regex = '''\b(dop_v1_[a-f0-9]{64})(?:[\x60'"\s;]|\\[nr]|$)'''
-entropy = 3
-keywords = ["dop_v1_"]
-
-[[rules]]
-id = "digitalocean-refresh-token"
-description = "Uncovered a DigitalOcean OAuth Refresh Token, which could allow prolonged unauthorized access and resource manipulation."
-regex = '''(?i)\b(dor_v1_[a-f0-9]{64})(?:[\x60'"\s;]|\\[nr]|$)'''
-keywords = ["dor_v1_"]
-
-[[rules]]
-id = "discord-api-token"
-description = "Detected a Discord API key, potentially compromising communication channels and user data privacy on Discord."
-regex = '''(?i)[\w.-]{0,50}?(?:discord)(?:[ \t\w.-]{0,20})[\s'"]{0,3}(?:=|>|:{1,3}=|\|\||:|=>|\?=|,)[\x60'"\s=]{0,5}([a-f0-9]{64})(?:[\x60'"\s;]|\\[nr]|$)'''
-keywords = ["discord"]
-
-[[rules]]
-id = "discord-client-id"
-description = "Identified a Discord client ID, which may lead to unauthorized integrations and data exposure in Discord applications."
-regex = '''(?i)[\w.-]{0,50}?(?:discord)(?:[ \t\w.-]{0,20})[\s'"]{0,3}(?:=|>|:{1,3}=|\|\||:|=>|\?=|,)[\x60'"\s=]{0,5}([0-9]{18})(?:[\x60'"\s;]|\\[nr]|$)'''
-entropy = 2
-keywords = ["discord"]
-
-[[rules]]
-id = "discord-client-secret"
-description = "Discovered a potential Discord client secret, risking compromised Discord bot integrations and data leaks."
-regex = '''(?i)[\w.-]{0,50}?(?:discord)(?:[ \t\w.-]{0,20})[\s'"]{0,3}(?:=|>|:{1,3}=|\|\||:|=>|\?=|,)[\x60'"\s=]{0,5}([a-z0-9=_\-]{32})(?:[\x60'"\s;]|\\[nr]|$)'''
-entropy = 2
-keywords = ["discord"]
-
-[[rules]]
-id = "doppler-api-token"
-description = "Discovered a Doppler API token, posing a risk to environment and secrets management security."
-regex = '''dp\.pt\.(?i)[a-z0-9]{43}'''
-entropy = 2
-keywords = ["dp.pt."]
-
-[[rules]]
-id = "droneci-access-token"
-description = "Detected a Droneci Access Token, potentially compromising continuous integration and deployment workflows."
-regex = '''(?i)[\w.-]{0,50}?(?:droneci)(?:[ \t\w.-]{0,20})[\s'"]{0,3}(?:=|>|:{1,3}=|\|\||:|=>|\?=|,)[\x60'"\s=]{0,5}([a-z0-9]{32})(?:[\x60'"\s;]|\\[nr]|$)'''
-keywords = ["droneci"]
-
-[[rules]]
-id = "dropbox-api-token"
-description = "Identified a Dropbox API secret, which could lead to unauthorized file access and data breaches in Dropbox storage."
-regex = '''(?i)[\w.-]{0,50}?(?:dropbox)(?:[ \t\w.-]{0,20})[\s'"]{0,3}(?:=|>|:{1,3}=|\|\||:|=>|\?=|,)[\x60'"\s=]{0,5}([a-z0-9]{15})(?:[\x60'"\s;]|\\[nr]|$)'''
-keywords = ["dropbox"]
-
-[[rules]]
-id = "dropbox-long-lived-api-token"
-description = "Found a Dropbox long-lived API token, risking prolonged unauthorized access to cloud storage and sensitive data."
-regex = '''(?i)[\w.-]{0,50}?(?:dropbox)(?:[ \t\w.-]{0,20})[\s'"]{0,3}(?:=|>|:{1,3}=|\|\||:|=>|\?=|,)[\x60'"\s=]{0,5}([a-z0-9]{11}(AAAAAAAAAA)[a-z0-9\-_=]{43})(?:[\x60'"\s;]|\\[nr]|$)'''
-keywords = ["dropbox"]
-
-[[rules]]
-id = "dropbox-short-lived-api-token"
-description = "Discovered a Dropbox short-lived API token, posing a risk of temporary but potentially harmful data access and manipulation."
-regex = '''(?i)[\w.-]{0,50}?(?:dropbox)(?:[ \t\w.-]{0,20})[\s'"]{0,3}(?:=|>|:{1,3}=|\|\||:|=>|\?=|,)[\x60'"\s=]{0,5}(sl\.[a-z0-9\-=_]{135})(?:[\x60'"\s;]|\\[nr]|$)'''
-keywords = ["dropbox"]
-
-[[rules]]
-id = "duffel-api-token"
-description = "Uncovered a Duffel API token, which may compromise travel platform integrations and sensitive customer data."
-regex = '''duffel_(?:test|live)_(?i)[a-z0-9_\-=]{43}'''
-entropy = 2
-keywords = ["duffel_"]
-
-[[rules]]
-id = "dynatrace-api-token"
-description = "Detected a Dynatrace API token, potentially risking application performance monitoring and data exposure."
-regex = '''dt0c01\.(?i)[a-z0-9]{24}\.[a-z0-9]{64}'''
-entropy = 4
-keywords = ["dt0c01."]
-
-[[rules]]
-id = "easypost-api-token"
-description = "Identified an EasyPost API token, which could lead to unauthorized postal and shipment service access and data exposure."
-regex = '''\bEZAK(?i)[a-z0-9]{54}\b'''
-entropy = 2
-keywords = ["ezak"]
-
-[[rules]]
-id = "easypost-test-api-token"
-description = "Detected an EasyPost test API token, risking exposure of test environments and potentially sensitive shipment data."
-regex = '''\bEZTK(?i)[a-z0-9]{54}\b'''
-entropy = 2
-keywords = ["eztk"]
-
-[[rules]]
-id = "etsy-access-token"
-description = "Found an Etsy Access Token, potentially compromising Etsy shop management and customer data."
-regex = '''(?i)[\w.-]{0,50}?(?:(?-i:ETSY|[Ee]tsy))(?:[ \t\w.-]{0,20})[\s'"]{0,3}(?:=|>|:{1,3}=|\|\||:|=>|\?=|,)[\x60'"\s=]{0,5}([a-z0-9]{24})(?:[\x60'"\s;]|\\[nr]|$)'''
-entropy = 3
-keywords = ["etsy"]
-
-[[rules]]
-id = "facebook-access-token"
-description = "Discovered a Facebook Access Token, posing a risk of unauthorized access to Facebook accounts and personal data exposure."
-regex = '''(?i)\b(\d{15,16}(\||%)[0-9a-z\-_]{27,40})(?:[\x60'"\s;]|\\[nr]|$)'''
-entropy = 3
-keywords = ["facebook"]
-
-[[rules]]
-id = "facebook-page-access-token"
-description = "Discovered a Facebook Page Access Token, posing a risk of unauthorized access to Facebook accounts and personal data exposure."
-regex = '''\b(EAA[MC](?i)[a-z0-9]{100,})(?:[\x60'"\s;]|\\[nr]|$)'''
-entropy = 4
-keywords = [
- "eaam",
- "eaac",
-]
-
-[[rules]]
-id = "facebook-secret"
-description = "Discovered a Facebook Application secret, posing a risk of unauthorized access to Facebook accounts and personal data exposure."
-regex = '''(?i)[\w.-]{0,50}?(?:facebook)(?:[ \t\w.-]{0,20})[\s'"]{0,3}(?:=|>|:{1,3}=|\|\||:|=>|\?=|,)[\x60'"\s=]{0,5}([a-f0-9]{32})(?:[\x60'"\s;]|\\[nr]|$)'''
-entropy = 3
-keywords = ["facebook"]
-
-[[rules]]
-id = "fastly-api-token"
-description = "Uncovered a Fastly API key, which may compromise CDN and edge cloud services, leading to content delivery and security issues."
-regex = '''(?i)[\w.-]{0,50}?(?:fastly)(?:[ \t\w.-]{0,20})[\s'"]{0,3}(?:=|>|:{1,3}=|\|\||:|=>|\?=|,)[\x60'"\s=]{0,5}([a-z0-9=_\-]{32})(?:[\x60'"\s;]|\\[nr]|$)'''
-keywords = ["fastly"]
-
-[[rules]]
-id = "finicity-api-token"
-description = "Detected a Finicity API token, potentially risking financial data access and unauthorized financial operations."
-regex = '''(?i)[\w.-]{0,50}?(?:finicity)(?:[ \t\w.-]{0,20})[\s'"]{0,3}(?:=|>|:{1,3}=|\|\||:|=>|\?=|,)[\x60'"\s=]{0,5}([a-f0-9]{32})(?:[\x60'"\s;]|\\[nr]|$)'''
-keywords = ["finicity"]
-
-[[rules]]
-id = "finicity-client-secret"
-description = "Identified a Finicity Client Secret, which could lead to compromised financial service integrations and data breaches."
-regex = '''(?i)[\w.-]{0,50}?(?:finicity)(?:[ \t\w.-]{0,20})[\s'"]{0,3}(?:=|>|:{1,3}=|\|\||:|=>|\?=|,)[\x60'"\s=]{0,5}([a-z0-9]{20})(?:[\x60'"\s;]|\\[nr]|$)'''
-keywords = ["finicity"]
-
-[[rules]]
-id = "finnhub-access-token"
-description = "Found a Finnhub Access Token, risking unauthorized access to financial market data and analytics."
-regex = '''(?i)[\w.-]{0,50}?(?:finnhub)(?:[ \t\w.-]{0,20})[\s'"]{0,3}(?:=|>|:{1,3}=|\|\||:|=>|\?=|,)[\x60'"\s=]{0,5}([a-z0-9]{20})(?:[\x60'"\s;]|\\[nr]|$)'''
-keywords = ["finnhub"]
-
-[[rules]]
-id = "flickr-access-token"
-description = "Discovered a Flickr Access Token, posing a risk of unauthorized photo management and potential data leakage."
-regex = '''(?i)[\w.-]{0,50}?(?:flickr)(?:[ \t\w.-]{0,20})[\s'"]{0,3}(?:=|>|:{1,3}=|\|\||:|=>|\?=|,)[\x60'"\s=]{0,5}([a-z0-9]{32})(?:[\x60'"\s;]|\\[nr]|$)'''
-keywords = ["flickr"]
-
-[[rules]]
-id = "flutterwave-encryption-key"
-description = "Uncovered a Flutterwave Encryption Key, which may compromise payment processing and sensitive financial information."
-regex = '''FLWSECK_TEST-(?i)[a-h0-9]{12}'''
-entropy = 2
-keywords = ["flwseck_test"]
-
-[[rules]]
-id = "flutterwave-public-key"
-description = "Detected a Finicity Public Key, potentially exposing public cryptographic operations and integrations."
-regex = '''FLWPUBK_TEST-(?i)[a-h0-9]{32}-X'''
-entropy = 2
-keywords = ["flwpubk_test"]
-
-[[rules]]
-id = "flutterwave-secret-key"
-description = "Identified a Flutterwave Secret Key, risking unauthorized financial transactions and data breaches."
-regex = '''FLWSECK_TEST-(?i)[a-h0-9]{32}-X'''
-entropy = 2
-keywords = ["flwseck_test"]
-
-[[rules]]
-id = "flyio-access-token"
-description = "Uncovered a Fly.io API key"
-regex = '''\b((?:fo1_[\w-]{43}|fm1[ar]_[a-zA-Z0-9+\/]{100,}={0,3}|fm2_[a-zA-Z0-9+\/]{100,}={0,3}))(?:[\x60'"\s;]|\\[nr]|$)'''
-entropy = 4
-keywords = [
- "fo1_",
- "fm1",
- "fm2_",
-]
-
-[[rules]]
-id = "frameio-api-token"
-description = "Found a Frame.io API token, potentially compromising video collaboration and project management."
-regex = '''fio-u-(?i)[a-z0-9\-_=]{64}'''
-keywords = ["fio-u-"]
-
-[[rules]]
-id = "freemius-secret-key"
-description = "Detected a Freemius secret key, potentially exposing sensitive information."
-regex = '''(?i)["']secret_key["']\s*=>\s*["'](sk_[\S]{29})["']'''
-path = '''(?i)\.php$'''
-keywords = ["secret_key"]
-
-[[rules]]
-id = "freshbooks-access-token"
-description = "Discovered a Freshbooks Access Token, posing a risk to accounting software access and sensitive financial data exposure."
-regex = '''(?i)[\w.-]{0,50}?(?:freshbooks)(?:[ \t\w.-]{0,20})[\s'"]{0,3}(?:=|>|:{1,3}=|\|\||:|=>|\?=|,)[\x60'"\s=]{0,5}([a-z0-9]{64})(?:[\x60'"\s;]|\\[nr]|$)'''
-keywords = ["freshbooks"]
-
-[[rules]]
-id = "gcp-api-key"
-description = "Uncovered a GCP API key, which could lead to unauthorized access to Google Cloud services and data breaches."
-regex = '''\b(AIza[\w-]{35})(?:[\x60'"\s;]|\\[nr]|$)'''
-entropy = 4
-keywords = ["aiza"]
-[[rules.allowlists]]
-regexes = [
- '''AIzaSyabcdefghijklmnopqrstuvwxyz1234567''',
- '''AIzaSyAnLA7NfeLquW1tJFpx_eQCxoX-oo6YyIs''',
- '''AIzaSyCkEhVjf3pduRDt6d1yKOMitrUEke8agEM''',
- '''AIzaSyDMAScliyLx7F0NPDEJi1QmyCgHIAODrlU''',
- '''AIzaSyD3asb-2pEZVqMkmL6M9N6nHZRR_znhrh0''',
- '''AIzayDNSXIbFmlXbIE6mCzDLQAqITYefhixbX4A''',
- '''AIzaSyAdOS2zB6NCsk1pCdZ4-P6GBdi_UUPwX7c''',
- '''AIzaSyASWm6HmTMdYWpgMnjRBjxcQ9CKctWmLd4''',
- '''AIzaSyANUvH9H9BsUccjsu2pCmEkOPjjaXeDQgY''',
- '''AIzaSyA5_iVawFQ8ABuTZNUdcwERLJv_a_p4wtM''',
- '''AIzaSyA4UrcGxgwQFTfaI3no3t7Lt1sjmdnP5sQ''',
- '''AIzaSyDSb51JiIcB6OJpwwMicseKRhhrOq1cS7g''',
- '''AIzaSyBF2RrAIm4a0mO64EShQfqfd2AFnzAvvuU''',
- '''AIzaSyBcE-OOIbhjyR83gm4r2MFCu4MJmprNXsw''',
- '''AIzaSyB8qGxt4ec15vitgn44duC5ucxaOi4FmqE''',
- '''AIzaSyA8vmApnrHNFE0bApF4hoZ11srVL_n0nvY''',
-]
-
-[[rules]]
-id = "generic-api-key"
-description = "Detected a Generic API Key, potentially exposing access to various services and sensitive operations."
-regex = '''(?i)[\w.-]{0,50}?(?:access|auth|(?-i:[Aa]pi|API)|credential|creds|key|passw(?:or)?d|secret|token)(?:[ \t\w.-]{0,20})[\s'"]{0,3}(?:=|>|:{1,3}=|\|\||:|=>|\?=|,)[\x60'"\s=]{0,5}([\w.=-]{10,150}|[a-z0-9][a-z0-9+/]{11,}={0,3})(?:[\x60'"\s;]|\\[nr]|$)'''
-entropy = 3.5
-keywords = [
- "access",
- "api",
- "auth",
- "key",
- "credential",
- "creds",
- "passwd",
- "password",
- "secret",
- "token",
-]
-[[rules.allowlists]]
-regexes = [
- '''^[a-zA-Z_.-]+$''',
-]
-[[rules.allowlists]]
-description = "Allowlist for Generic API Keys"
-regexTarget = "match"
-regexes = [
- '''(?i)(?:access(?:ibility|or)|access[_.-]?id|random[_.-]?access|api[_.-]?(?:id|name|version)|rapid|capital|[a-z0-9-]*?api[a-z0-9-]*?:jar:|author|X-MS-Exchange-Organization-Auth|Authentication-Results|(?:credentials?[_.-]?id|withCredentials)|(?:bucket|foreign|hot|idx|natural|primary|pub(?:lic)?|schema|sequence)[_.-]?key|(?:turkey)|key[_.-]?(?:alias|board|code|frame|id|length|mesh|name|pair|press(?:ed)?|ring|selector|signature|size|stone|storetype|word|up|down|left|right)|key[_.-]?vault[_.-]?(?:id|name)|keyVaultToStoreSecrets|key(?:store|tab)[_.-]?(?:file|path)|issuerkeyhash|(?-i:[DdMm]onkey|[DM]ONKEY)|keying|(?:secret)[_.-]?(?:length|name|size)|UserSecretsId|(?:csrf)[_.-]?token|(?:io\.jsonwebtoken[ \t]?:[ \t]?[\w-]+)|(?:api|credentials|token)[_.-]?(?:endpoint|ur[il])|public[_.-]?token|(?:key|token)[_.-]?file|(?-i:(?:[A-Z_]+=\n[A-Z_]+=|[a-z_]+=\n[a-z_]+=)(?:\n|\z))|(?-i:(?:[A-Z.]+=\n[A-Z.]+=|[a-z.]+=\n[a-z.]+=)(?:\n|\z)))''',
-]
-stopwords = [
- "000000",
- "6fe4476ee5a1832882e326b506d14126",
- "_ec2_",
- "aaaaaa",
- "about",
- "abstract",
- "academy",
- "acces",
- "account",
- "act-",
- "act.",
- "act_",
- "action",
- "active",
- "actively",
- "activity",
- "adapter",
- "add-",
- "add-on",
- "add.",
- "add_",
- "addon",
- "addres",
- "admin",
- "adobe",
- "advanced",
- "adventure",
- "agent",
- "agile",
- "air-",
- "air.",
- "air_",
- "ajax",
- "akka",
- "alert",
- "alfred",
- "algorithm",
- "all-",
- "all.",
- "all_",
- "alloy",
- "alpha",
- "amazon",
- "amqp",
- "analysi",
- "analytic",
- "analyzer",
- "android",
- "angular",
- "angularj",
- "animate",
- "animation",
- "another",
- "ansible",
- "answer",
- "ant-",
- "ant.",
- "ant_",
- "any-",
- "any.",
- "any_",
- "apache",
- "app-",
- "app.",
- "app_",
- "apple",
- "arch",
- "archive",
- "archived",
- "arduino",
- "array",
- "art-",
- "art.",
- "art_",
- "article",
- "asp-",
- "asp.",
- "asp_",
- "asset",
- "async",
- "atom",
- "attention",
- "audio",
- "audit",
- "aura",
- "auth",
- "author",
- "authorize",
- "auto",
- "automated",
- "automatic",
- "awesome",
- "aws_",
- "azure",
- "back",
- "backbone",
- "backend",
- "backup",
- "bar-",
- "bar.",
- "bar_",
- "base",
- "based",
- "bash",
- "basic",
- "batch",
- "been",
- "beer",
- "behavior",
- "being",
- "benchmark",
- "best",
- "beta",
- "better",
- "big-",
- "big.",
- "big_",
- "binary",
- "binding",
- "bit-",
- "bit.",
- "bit_",
- "bitcoin",
- "block",
- "blog",
- "board",
- "book",
- "bookmark",
- "boost",
- "boot",
- "bootstrap",
- "bosh",
- "bot-",
- "bot.",
- "bot_",
- "bower",
- "box-",
- "box.",
- "box_",
- "boxen",
- "bracket",
- "branch",
- "bridge",
- "browser",
- "brunch",
- "buffer",
- "bug-",
- "bug.",
- "bug_",
- "build",
- "builder",
- "building",
- "buildout",
- "buildpack",
- "built",
- "bundle",
- "busines",
- "but-",
- "but.",
- "but_",
- "button",
- "cache",
- "caching",
- "cakephp",
- "calendar",
- "call",
- "camera",
- "campfire",
- "can-",
- "can.",
- "can_",
- "canva",
- "captcha",
- "capture",
- "card",
- "carousel",
- "case",
- "cassandra",
- "cat-",
- "cat.",
- "cat_",
- "category",
- "center",
- "cento",
- "challenge",
- "change",
- "changelog",
- "channel",
- "chart",
- "chat",
- "cheat",
- "check",
- "checker",
- "chef",
- "ches",
- "chinese",
- "chosen",
- "chrome",
- "ckeditor",
- "clas",
- "classe",
- "classic",
- "clean",
- "cli-",
- "cli.",
- "cli_",
- "client",
- "clojure",
- "clone",
- "closure",
- "cloud",
- "club",
- "cluster",
- "cms-",
- "cms_",
- "coco",
- "code",
- "coding",
- "coffee",
- "color",
- "combination",
- "combo",
- "command",
- "commander",
- "comment",
- "commit",
- "common",
- "community",
- "compas",
- "compiler",
- "complete",
- "component",
- "composer",
- "computer",
- "computing",
- "con-",
- "con.",
- "con_",
- "concept",
- "conf",
- "config",
- "connect",
- "connector",
- "console",
- "contact",
- "container",
- "contao",
- "content",
- "contest",
- "context",
- "control",
- "convert",
- "converter",
- "conway'",
- "cookbook",
- "cookie",
- "cool",
- "copy",
- "cordova",
- "core",
- "couchbase",
- "couchdb",
- "countdown",
- "counter",
- "course",
- "craft",
- "crawler",
- "create",
- "creating",
- "creator",
- "credential",
- "crm-",
- "crm.",
- "crm_",
- "cros",
- "crud",
- "csv-",
- "csv.",
- "csv_",
- "cube",
- "cucumber",
- "cuda",
- "current",
- "currently",
- "custom",
- "daemon",
- "dark",
- "dart",
- "dash",
- "dashboard",
- "data",
- "database",
- "date",
- "day-",
- "day.",
- "day_",
- "dead",
- "debian",
- "debug",
- "debugger",
- "deck",
- "define",
- "del-",
- "del.",
- "del_",
- "delete",
- "demo",
- "deploy",
- "design",
- "designer",
- "desktop",
- "detection",
- "detector",
- "dev-",
- "dev.",
- "dev_",
- "develop",
- "developer",
- "device",
- "devise",
- "diff",
- "digital",
- "directive",
- "directory",
- "discovery",
- "display",
- "django",
- "dns-",
- "dns_",
- "doc-",
- "doc.",
- "doc_",
- "docker",
- "docpad",
- "doctrine",
- "document",
- "doe-",
- "doe.",
- "doe_",
- "dojo",
- "dom-",
- "dom.",
- "dom_",
- "domain",
- "don't",
- "done",
- "dot-",
- "dot.",
- "dot_",
- "dotfile",
- "download",
- "draft",
- "drag",
- "drill",
- "drive",
- "driven",
- "driver",
- "drop",
- "dropbox",
- "drupal",
- "dsl-",
- "dsl.",
- "dsl_",
- "dynamic",
- "easy",
- "ecdsa",
- "eclipse",
- "edit",
- "editing",
- "edition",
- "editor",
- "element",
- "emac",
- "email",
- "embed",
- "embedded",
- "ember",
- "emitter",
- "emulator",
- "encoding",
- "endpoint",
- "engine",
- "english",
- "enhanced",
- "entity",
- "entry",
- "env_",
- "episode",
- "erlang",
- "error",
- "espresso",
- "event",
- "evented",
- "example",
- "exchange",
- "exercise",
- "experiment",
- "expire",
- "exploit",
- "explorer",
- "export",
- "exporter",
- "expres",
- "ext-",
- "ext.",
- "ext_",
- "extended",
- "extension",
- "external",
- "extra",
- "extractor",
- "fabric",
- "facebook",
- "factory",
- "fake",
- "fast",
- "feature",
- "feed",
- "fewfwef",
- "ffmpeg",
- "field",
- "file",
- "filter",
- "find",
- "finder",
- "firefox",
- "firmware",
- "first",
- "fish",
- "fix-",
- "fix_",
- "flash",
- "flask",
- "flat",
- "flex",
- "flexible",
- "flickr",
- "flow",
- "fluent",
- "fluentd",
- "fluid",
- "folder",
- "font",
- "force",
- "foreman",
- "fork",
- "form",
- "format",
- "formatter",
- "forum",
- "foundry",
- "framework",
- "free",
- "friend",
- "friendly",
- "front-end",
- "frontend",
- "ftp-",
- "ftp.",
- "ftp_",
- "fuel",
- "full",
- "fun-",
- "fun.",
- "fun_",
- "func",
- "future",
- "gaia",
- "gallery",
- "game",
- "gateway",
- "gem-",
- "gem.",
- "gem_",
- "gen-",
- "gen.",
- "gen_",
- "general",
- "generator",
- "generic",
- "genetic",
- "get-",
- "get.",
- "get_",
- "getenv",
- "getting",
- "ghost",
- "gist",
- "git-",
- "git.",
- "git_",
- "github",
- "gitignore",
- "gitlab",
- "glas",
- "gmail",
- "gnome",
- "gnu-",
- "gnu.",
- "gnu_",
- "goal",
- "golang",
- "gollum",
- "good",
- "google",
- "gpu-",
- "gpu.",
- "gpu_",
- "gradle",
- "grail",
- "graph",
- "graphic",
- "great",
- "grid",
- "groovy",
- "group",
- "grunt",
- "guard",
- "gui-",
- "gui.",
- "gui_",
- "guide",
- "guideline",
- "gulp",
- "gwt-",
- "gwt.",
- "gwt_",
- "hack",
- "hackathon",
- "hacker",
- "hacking",
- "hadoop",
- "haml",
- "handler",
- "hardware",
- "has-",
- "has_",
- "hash",
- "haskell",
- "have",
- "haxe",
- "hello",
- "help",
- "helper",
- "here",
- "hero",
- "heroku",
- "high",
- "hipchat",
- "history",
- "home",
- "homebrew",
- "homepage",
- "hook",
- "host",
- "hosting",
- "hot-",
- "hot.",
- "hot_",
- "house",
- "how-",
- "how.",
- "how_",
- "html",
- "http",
- "hub-",
- "hub.",
- "hub_",
- "hubot",
- "human",
- "icon",
- "ide-",
- "ide.",
- "ide_",
- "idea",
- "identity",
- "idiomatic",
- "image",
- "impact",
- "import",
- "important",
- "importer",
- "impres",
- "index",
- "infinite",
- "info",
- "injection",
- "inline",
- "input",
- "inside",
- "inspector",
- "instagram",
- "install",
- "installer",
- "instant",
- "intellij",
- "interface",
- "internet",
- "interview",
- "into",
- "intro",
- "ionic",
- "iphone",
- "ipython",
- "irc-",
- "irc_",
- "iso-",
- "iso.",
- "iso_",
- "issue",
- "jade",
- "jasmine",
- "java",
- "jbos",
- "jekyll",
- "jenkin",
- "jetbrains",
- "job-",
- "job.",
- "job_",
- "joomla",
- "jpa-",
- "jpa.",
- "jpa_",
- "jquery",
- "json",
- "just",
- "kafka",
- "karma",
- "kata",
- "kernel",
- "keyboard",
- "kindle",
- "kit-",
- "kit.",
- "kit_",
- "kitchen",
- "knife",
- "koan",
- "kohana",
- "lab-",
- "lab.",
- "lab_",
- "lambda",
- "lamp",
- "language",
- "laravel",
- "last",
- "latest",
- "latex",
- "launcher",
- "layer",
- "layout",
- "lazy",
- "ldap",
- "leaflet",
- "league",
- "learn",
- "learning",
- "led-",
- "led.",
- "led_",
- "leetcode",
- "les-",
- "les.",
- "les_",
- "level",
- "leveldb",
- "lib-",
- "lib.",
- "lib_",
- "librarie",
- "library",
- "license",
- "life",
- "liferay",
- "light",
- "lightbox",
- "like",
- "line",
- "link",
- "linked",
- "linkedin",
- "linux",
- "lisp",
- "list",
- "lite",
- "little",
- "load",
- "loader",
- "local",
- "location",
- "lock",
- "log-",
- "log.",
- "log_",
- "logger",
- "logging",
- "logic",
- "login",
- "logstash",
- "longer",
- "look",
- "love",
- "lua-",
- "lua.",
- "lua_",
- "mac-",
- "mac.",
- "mac_",
- "machine",
- "made",
- "magento",
- "magic",
- "mail",
- "make",
- "maker",
- "making",
- "man-",
- "man.",
- "man_",
- "manage",
- "manager",
- "manifest",
- "manual",
- "map-",
- "map.",
- "map_",
- "mapper",
- "mapping",
- "markdown",
- "markup",
- "master",
- "math",
- "matrix",
- "maven",
- "md5",
- "mean",
- "media",
- "mediawiki",
- "meetup",
- "memcached",
- "memory",
- "menu",
- "merchant",
- "message",
- "messaging",
- "meta",
- "metadata",
- "meteor",
- "method",
- "metric",
- "micro",
- "middleman",
- "migration",
- "minecraft",
- "miner",
- "mini",
- "minimal",
- "mirror",
- "mit-",
- "mit.",
- "mit_",
- "mobile",
- "mocha",
- "mock",
- "mod-",
- "mod.",
- "mod_",
- "mode",
- "model",
- "modern",
- "modular",
- "module",
- "modx",
- "money",
- "mongo",
- "mongodb",
- "mongoid",
- "mongoose",
- "monitor",
- "monkey",
- "more",
- "motion",
- "moved",
- "movie",
- "mozilla",
- "mqtt",
- "mule",
- "multi",
- "multiple",
- "music",
- "mustache",
- "mvc-",
- "mvc.",
- "mvc_",
- "mysql",
- "nagio",
- "name",
- "native",
- "need",
- "neo-",
- "neo.",
- "neo_",
- "nest",
- "nested",
- "net-",
- "net.",
- "net_",
- "nette",
- "network",
- "new-",
- "new.",
- "new_",
- "next",
- "nginx",
- "ninja",
- "nlp-",
- "nlp.",
- "nlp_",
- "node",
- "nodej",
- "nosql",
- "not-",
- "not.",
- "not_",
- "note",
- "notebook",
- "notepad",
- "notice",
- "notifier",
- "now-",
- "now.",
- "now_",
- "number",
- "oauth",
- "object",
- "objective",
- "obsolete",
- "ocaml",
- "octopres",
- "official",
- "old-",
- "old.",
- "old_",
- "onboard",
- "online",
- "only",
- "open",
- "opencv",
- "opengl",
- "openshift",
- "openwrt",
- "option",
- "oracle",
- "org-",
- "org.",
- "org_",
- "origin",
- "original",
- "orm-",
- "orm.",
- "orm_",
- "osx-",
- "osx_",
- "our-",
- "our.",
- "our_",
- "out-",
- "out.",
- "out_",
- "output",
- "over",
- "overview",
- "own-",
- "own.",
- "own_",
- "pack",
- "package",
- "packet",
- "page",
- "panel",
- "paper",
- "paperclip",
- "para",
- "parallax",
- "parallel",
- "parse",
- "parser",
- "parsing",
- "particle",
- "party",
- "password",
- "patch",
- "path",
- "pattern",
- "payment",
- "paypal",
- "pdf-",
- "pdf.",
- "pdf_",
- "pebble",
- "people",
- "perl",
- "personal",
- "phalcon",
- "phoenix",
- "phone",
- "phonegap",
- "photo",
- "php-",
- "php.",
- "php_",
- "physic",
- "picker",
- "pipeline",
- "platform",
- "play",
- "player",
- "please",
- "plu-",
- "plu.",
- "plu_",
- "plug-in",
- "plugin",
- "plupload",
- "png-",
- "png.",
- "png_",
- "poker",
- "polyfill",
- "polymer",
- "pool",
- "pop-",
- "pop.",
- "pop_",
- "popcorn",
- "popup",
- "port",
- "portable",
- "portal",
- "portfolio",
- "post",
- "power",
- "powered",
- "powerful",
- "prelude",
- "pretty",
- "preview",
- "principle",
- "print",
- "pro-",
- "pro.",
- "pro_",
- "problem",
- "proc",
- "product",
- "profile",
- "profiler",
- "program",
- "progres",
- "project",
- "protocol",
- "prototype",
- "provider",
- "proxy",
- "public",
- "pull",
- "puppet",
- "pure",
- "purpose",
- "push",
- "pusher",
- "pyramid",
- "python",
- "quality",
- "query",
- "queue",
- "quick",
- "rabbitmq",
- "rack",
- "radio",
- "rail",
- "railscast",
- "random",
- "range",
- "raspberry",
- "rdf-",
- "rdf.",
- "rdf_",
- "react",
- "reactive",
- "read",
- "reader",
- "readme",
- "ready",
- "real",
- "real-time",
- "reality",
- "realtime",
- "recipe",
- "recorder",
- "red-",
- "red.",
- "red_",
- "reddit",
- "redi",
- "redmine",
- "reference",
- "refinery",
- "refresh",
- "registry",
- "related",
- "release",
- "remote",
- "rendering",
- "repo",
- "report",
- "request",
- "require",
- "required",
- "requirej",
- "research",
- "resource",
- "response",
- "resque",
- "rest",
- "restful",
- "resume",
- "reveal",
- "reverse",
- "review",
- "riak",
- "rich",
- "right",
- "ring",
- "robot",
- "role",
- "room",
- "router",
- "routing",
- "rpc-",
- "rpc.",
- "rpc_",
- "rpg-",
- "rpg.",
- "rpg_",
- "rspec",
- "ruby-",
- "ruby.",
- "ruby_",
- "rule",
- "run-",
- "run.",
- "run_",
- "runner",
- "running",
- "runtime",
- "rust",
- "rvm-",
- "rvm.",
- "rvm_",
- "salt",
- "sample",
- "sandbox",
- "sas-",
- "sas.",
- "sas_",
- "sbt-",
- "sbt.",
- "sbt_",
- "scala",
- "scalable",
- "scanner",
- "schema",
- "scheme",
- "school",
- "science",
- "scraper",
- "scratch",
- "screen",
- "script",
- "scroll",
- "scs-",
- "scs.",
- "scs_",
- "sdk-",
- "sdk.",
- "sdk_",
- "sdl-",
- "sdl.",
- "sdl_",
- "search",
- "secure",
- "security",
- "see-",
- "see.",
- "see_",
- "seed",
- "select",
- "selector",
- "selenium",
- "semantic",
- "sencha",
- "send",
- "sentiment",
- "serie",
- "server",
- "service",
- "session",
- "set-",
- "set.",
- "set_",
- "setting",
- "setup",
- "sha1",
- "sha2",
- "sha256",
- "share",
- "shared",
- "sharing",
- "sheet",
- "shell",
- "shield",
- "shipping",
- "shop",
- "shopify",
- "shortener",
- "should",
- "show",
- "showcase",
- "side",
- "silex",
- "simple",
- "simulator",
- "single",
- "site",
- "skeleton",
- "sketch",
- "skin",
- "slack",
- "slide",
- "slider",
- "slim",
- "small",
- "smart",
- "smtp",
- "snake",
- "snapshot",
- "snippet",
- "soap",
- "social",
- "socket",
- "software",
- "solarized",
- "solr",
- "solution",
- "solver",
- "some",
- "soon",
- "source",
- "space",
- "spark",
- "spatial",
- "spec",
- "sphinx",
- "spine",
- "spotify",
- "spree",
- "spring",
- "sprite",
- "sql-",
- "sql.",
- "sql_",
- "sqlite",
- "ssh-",
- "ssh.",
- "ssh_",
- "stack",
- "staging",
- "standard",
- "stanford",
- "start",
- "started",
- "starter",
- "startup",
- "stat",
- "statamic",
- "state",
- "static",
- "statistic",
- "statsd",
- "statu",
- "steam",
- "step",
- "still",
- "stm-",
- "stm.",
- "stm_",
- "storage",
- "store",
- "storm",
- "story",
- "strategy",
- "stream",
- "streaming",
- "string",
- "stripe",
- "structure",
- "studio",
- "study",
- "stuff",
- "style",
- "sublime",
- "sugar",
- "suite",
- "summary",
- "super",
- "support",
- "supported",
- "svg-",
- "svg.",
- "svg_",
- "svn-",
- "svn.",
- "svn_",
- "swagger",
- "swift",
- "switch",
- "switcher",
- "symfony",
- "symphony",
- "sync",
- "synopsi",
- "syntax",
- "system",
- "tab-",
- "tab.",
- "tab_",
- "table",
- "tag-",
- "tag.",
- "tag_",
- "talk",
- "target",
- "task",
- "tcp-",
- "tcp.",
- "tcp_",
- "tdd-",
- "tdd.",
- "tdd_",
- "team",
- "tech",
- "template",
- "term",
- "terminal",
- "testing",
- "tetri",
- "text",
- "textmate",
- "theme",
- "theory",
- "three",
- "thrift",
- "time",
- "timeline",
- "timer",
- "tiny",
- "tinymce",
- "tip-",
- "tip.",
- "tip_",
- "title",
- "todo",
- "todomvc",
- "token",
- "tool",
- "toolbox",
- "toolkit",
- "top-",
- "top.",
- "top_",
- "tornado",
- "touch",
- "tower",
- "tracker",
- "tracking",
- "traffic",
- "training",
- "transfer",
- "translate",
- "transport",
- "tree",
- "trello",
- "try-",
- "try.",
- "try_",
- "tumblr",
- "tut-",
- "tut.",
- "tut_",
- "tutorial",
- "tweet",
- "twig",
- "twitter",
- "type",
- "typo",
- "ubuntu",
- "uiview",
- "ultimate",
- "under",
- "unit",
- "unity",
- "universal",
- "unix",
- "update",
- "updated",
- "upgrade",
- "upload",
- "uploader",
- "uri-",
- "uri.",
- "uri_",
- "url-",
- "url.",
- "url_",
- "usage",
- "usb-",
- "usb.",
- "usb_",
- "use-",
- "use.",
- "use_",
- "used",
- "useful",
- "user",
- "using",
- "util",
- "utilitie",
- "utility",
- "vagrant",
- "validator",
- "value",
- "variou",
- "varnish",
- "version",
- "via-",
- "via.",
- "via_",
- "video",
- "view",
- "viewer",
- "vim-",
- "vim.",
- "vim_",
- "vimrc",
- "virtual",
- "vision",
- "visual",
- "vpn",
- "want",
- "warning",
- "watch",
- "watcher",
- "wave",
- "way-",
- "way.",
- "way_",
- "weather",
- "web-",
- "web_",
- "webapp",
- "webgl",
- "webhook",
- "webkit",
- "webrtc",
- "website",
- "websocket",
- "welcome",
- "what",
- "what'",
- "when",
- "where",
- "which",
- "why-",
- "why.",
- "why_",
- "widget",
- "wifi",
- "wiki",
- "win-",
- "win.",
- "win_",
- "window",
- "wip-",
- "wip.",
- "wip_",
- "within",
- "without",
- "wizard",
- "word",
- "wordpres",
- "work",
- "worker",
- "workflow",
- "working",
- "workshop",
- "world",
- "wrapper",
- "write",
- "writer",
- "writing",
- "written",
- "www-",
- "www.",
- "www_",
- "xamarin",
- "xcode",
- "xml-",
- "xml.",
- "xml_",
- "xmpp",
- "xxxxxx",
- "yahoo",
- "yaml",
- "yandex",
- "yeoman",
- "yet-",
- "yet.",
- "yet_",
- "yii-",
- "yii.",
- "yii_",
- "youtube",
- "yui-",
- "yui.",
- "yui_",
- "zend",
- "zero",
- "zip-",
- "zip.",
- "zip_",
- "zsh-",
- "zsh.",
- "zsh_",
-]
-[[rules.allowlists]]
-regexTarget = "line"
-regexes = [
- '''--mount=type=secret,''',
- '''import[ \t]+{[ \t\w,]+}[ \t]+from[ \t]+['"][^'"]+['"]''',
-]
-[[rules.allowlists]]
-condition = "AND"
-paths = [
- '''\.bb$''','''\.bbappend$''','''\.bbclass$''','''\.inc$''',
-]
-regexTarget = "line"
-regexes = [
- '''LICENSE[^=]*=\s*"[^"]+''',
- '''LIC_FILES_CHKSUM[^=]*=\s*"[^"]+''',
- '''SRC[^=]*=\s*"[a-zA-Z0-9]+''',
-]
-
-[[rules]]
-id = "github-app-token"
-description = "Identified a GitHub App Token, which may compromise GitHub application integrations and source code security."
-regex = '''(?:ghu|ghs)_[0-9a-zA-Z]{36}'''
-entropy = 3
-keywords = [
- "ghu_",
- "ghs_",
-]
-[[rules.allowlists]]
-paths = [
- '''(?:^|/)@octokit/auth-token/README\.md$''',
-]
-
-[[rules]]
-id = "github-fine-grained-pat"
-description = "Found a GitHub Fine-Grained Personal Access Token, risking unauthorized repository access and code manipulation."
-regex = '''github_pat_\w{82}'''
-entropy = 3
-keywords = ["github_pat_"]
-
-[[rules]]
-id = "github-oauth"
-description = "Discovered a GitHub OAuth Access Token, posing a risk of compromised GitHub account integrations and data leaks."
-regex = '''gho_[0-9a-zA-Z]{36}'''
-entropy = 3
-keywords = ["gho_"]
-
-[[rules]]
-id = "github-pat"
-description = "Uncovered a GitHub Personal Access Token, potentially leading to unauthorized repository access and sensitive content exposure."
-regex = '''ghp_[0-9a-zA-Z]{36}'''
-entropy = 3
-keywords = ["ghp_"]
-[[rules.allowlists]]
-paths = [
- '''(?:^|/)@octokit/auth-token/README\.md$''',
-]
-
-[[rules]]
-id = "github-refresh-token"
-description = "Detected a GitHub Refresh Token, which could allow prolonged unauthorized access to GitHub services."
-regex = '''ghr_[0-9a-zA-Z]{36}'''
-entropy = 3
-keywords = ["ghr_"]
-
-[[rules]]
-id = "gitlab-cicd-job-token"
-description = "Identified a GitLab CI/CD Job Token, potential access to projects and some APIs on behalf of a user while the CI job is running."
-regex = '''glcbt-[0-9a-zA-Z]{1,5}_[0-9a-zA-Z_-]{20}'''
-entropy = 3
-keywords = ["glcbt-"]
-
-[[rules]]
-id = "gitlab-deploy-token"
-description = "Identified a GitLab Deploy Token, risking access to repositories, packages and containers with write access."
-regex = '''gldt-[0-9a-zA-Z_\-]{20}'''
-entropy = 3
-keywords = ["gldt-"]
-
-[[rules]]
-id = "gitlab-feature-flag-client-token"
-description = "Identified a GitLab feature flag client token, risks exposing user lists and features flags used by an application."
-regex = '''glffct-[0-9a-zA-Z_\-]{20}'''
-entropy = 3
-keywords = ["glffct-"]
-
-[[rules]]
-id = "gitlab-feed-token"
-description = "Identified a GitLab feed token, risking exposure of user data."
-regex = '''glft-[0-9a-zA-Z_\-]{20}'''
-entropy = 3
-keywords = ["glft-"]
-
-[[rules]]
-id = "gitlab-incoming-mail-token"
-description = "Identified a GitLab incoming mail token, risking manipulation of data sent by mail."
-regex = '''glimt-[0-9a-zA-Z_\-]{25}'''
-entropy = 3
-keywords = ["glimt-"]
-
-[[rules]]
-id = "gitlab-kubernetes-agent-token"
-description = "Identified a GitLab Kubernetes Agent token, risking access to repos and registry of projects connected via agent."
-regex = '''glagent-[0-9a-zA-Z_\-]{50}'''
-entropy = 3
-keywords = ["glagent-"]
-
-[[rules]]
-id = "gitlab-oauth-app-secret"
-description = "Identified a GitLab OIDC Application Secret, risking access to apps using GitLab as authentication provider."
-regex = '''gloas-[0-9a-zA-Z_\-]{64}'''
-entropy = 3
-keywords = ["gloas-"]
-
-[[rules]]
-id = "gitlab-pat"
-description = "Identified a GitLab Personal Access Token, risking unauthorized access to GitLab repositories and codebase exposure."
-regex = '''glpat-[\w-]{20}'''
-entropy = 3
-keywords = ["glpat-"]
-
-[[rules]]
-id = "gitlab-pat-routable"
-description = "Identified a GitLab Personal Access Token (routable), risking unauthorized access to GitLab repositories and codebase exposure."
-regex = '''\bglpat-[0-9a-zA-Z_-]{27,300}\.[0-9a-z]{2}[0-9a-z]{7}\b'''
-entropy = 4
-keywords = ["glpat-"]
-
-[[rules]]
-id = "gitlab-ptt"
-description = "Found a GitLab Pipeline Trigger Token, potentially compromising continuous integration workflows and project security."
-regex = '''glptt-[0-9a-f]{40}'''
-entropy = 3
-keywords = ["glptt-"]
-
-[[rules]]
-id = "gitlab-rrt"
-description = "Discovered a GitLab Runner Registration Token, posing a risk to CI/CD pipeline integrity and unauthorized access."
-regex = '''GR1348941[\w-]{20}'''
-entropy = 3
-keywords = ["gr1348941"]
-
-[[rules]]
-id = "gitlab-runner-authentication-token"
-description = "Discovered a GitLab Runner Authentication Token, posing a risk to CI/CD pipeline integrity and unauthorized access."
-regex = '''glrt-[0-9a-zA-Z_\-]{20}'''
-entropy = 3
-keywords = ["glrt-"]
-
-[[rules]]
-id = "gitlab-runner-authentication-token-routable"
-description = "Discovered a GitLab Runner Authentication Token (Routable), posing a risk to CI/CD pipeline integrity and unauthorized access."
-regex = '''\bglrt-t\d_[0-9a-zA-Z_\-]{27,300}\.[0-9a-z]{2}[0-9a-z]{7}\b'''
-entropy = 4
-keywords = ["glrt-"]
-
-[[rules]]
-id = "gitlab-scim-token"
-description = "Discovered a GitLab SCIM Token, posing a risk to unauthorized access for a organization or instance."
-regex = '''glsoat-[0-9a-zA-Z_\-]{20}'''
-entropy = 3
-keywords = ["glsoat-"]
-
-[[rules]]
-id = "gitlab-session-cookie"
-description = "Discovered a GitLab Session Cookie, posing a risk to unauthorized access to a user account."
-regex = '''_gitlab_session=[0-9a-z]{32}'''
-entropy = 3
-keywords = ["_gitlab_session="]
-
-[[rules]]
-id = "gitter-access-token"
-description = "Uncovered a Gitter Access Token, which may lead to unauthorized access to chat and communication services."
-regex = '''(?i)[\w.-]{0,50}?(?:gitter)(?:[ \t\w.-]{0,20})[\s'"]{0,3}(?:=|>|:{1,3}=|\|\||:|=>|\?=|,)[\x60'"\s=]{0,5}([a-z0-9_-]{40})(?:[\x60'"\s;]|\\[nr]|$)'''
-keywords = ["gitter"]
-
-[[rules]]
-id = "gocardless-api-token"
-description = "Detected a GoCardless API token, potentially risking unauthorized direct debit payment operations and financial data exposure."
-regex = '''(?i)[\w.-]{0,50}?(?:gocardless)(?:[ \t\w.-]{0,20})[\s'"]{0,3}(?:=|>|:{1,3}=|\|\||:|=>|\?=|,)[\x60'"\s=]{0,5}(live_(?i)[a-z0-9\-_=]{40})(?:[\x60'"\s;]|\\[nr]|$)'''
-keywords = [
- "live_",
- "gocardless",
-]
-
-[[rules]]
-id = "grafana-api-key"
-description = "Identified a Grafana API key, which could compromise monitoring dashboards and sensitive data analytics."
-regex = '''(?i)\b(eyJrIjoi[A-Za-z0-9]{70,400}={0,3})(?:[\x60'"\s;]|\\[nr]|$)'''
-entropy = 3
-keywords = ["eyjrijoi"]
-
-[[rules]]
-id = "grafana-cloud-api-token"
-description = "Found a Grafana cloud API token, risking unauthorized access to cloud-based monitoring services and data exposure."
-regex = '''(?i)\b(glc_[A-Za-z0-9+/]{32,400}={0,3})(?:[\x60'"\s;]|\\[nr]|$)'''
-entropy = 3
-keywords = ["glc_"]
-
-[[rules]]
-id = "grafana-service-account-token"
-description = "Discovered a Grafana service account token, posing a risk of compromised monitoring services and data integrity."
-regex = '''(?i)\b(glsa_[A-Za-z0-9]{32}_[A-Fa-f0-9]{8})(?:[\x60'"\s;]|\\[nr]|$)'''
-entropy = 3
-keywords = ["glsa_"]
-
-[[rules]]
-id = "harness-api-key"
-description = "Identified a Harness Access Token (PAT or SAT), risking unauthorized access to a Harness account."
-regex = '''(?:pat|sat)\.[a-zA-Z0-9_-]{22}\.[a-zA-Z0-9]{24}\.[a-zA-Z0-9]{20}'''
-keywords = [
- "pat.",
- "sat.",
-]
-
-[[rules]]
-id = "hashicorp-tf-api-token"
-description = "Uncovered a HashiCorp Terraform user/org API token, which may lead to unauthorized infrastructure management and security breaches."
-regex = '''(?i)[a-z0-9]{14}\.(?-i:atlasv1)\.[a-z0-9\-_=]{60,70}'''
-entropy = 3.5
-keywords = ["atlasv1"]
-
-[[rules]]
-id = "hashicorp-tf-password"
-description = "Identified a HashiCorp Terraform password field, risking unauthorized infrastructure configuration and security breaches."
-regex = '''(?i)[\w.-]{0,50}?(?:administrator_login_password|password)(?:[ \t\w.-]{0,20})[\s'"]{0,3}(?:=|>|:{1,3}=|\|\||:|=>|\?=|,)[\x60'"\s=]{0,5}("[a-z0-9=_\-]{8,20}")(?:[\x60'"\s;]|\\[nr]|$)'''
-path = '''(?i)\.(?:tf|hcl)$'''
-entropy = 2
-keywords = [
- "administrator_login_password",
- "password",
-]
-
-[[rules]]
-id = "heroku-api-key"
-description = "Detected a Heroku API Key, potentially compromising cloud application deployments and operational security."
-regex = '''(?i)[\w.-]{0,50}?(?:heroku)(?:[ \t\w.-]{0,20})[\s'"]{0,3}(?:=|>|:{1,3}=|\|\||:|=>|\?=|,)[\x60'"\s=]{0,5}([0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12})(?:[\x60'"\s;]|\\[nr]|$)'''
-keywords = ["heroku"]
-
-[[rules]]
-id = "hubspot-api-key"
-description = "Found a HubSpot API Token, posing a risk to CRM data integrity and unauthorized marketing operations."
-regex = '''(?i)[\w.-]{0,50}?(?:hubspot)(?:[ \t\w.-]{0,20})[\s'"]{0,3}(?:=|>|:{1,3}=|\|\||:|=>|\?=|,)[\x60'"\s=]{0,5}([0-9A-F]{8}-[0-9A-F]{4}-[0-9A-F]{4}-[0-9A-F]{4}-[0-9A-F]{12})(?:[\x60'"\s;]|\\[nr]|$)'''
-keywords = ["hubspot"]
-
-[[rules]]
-id = "huggingface-access-token"
-description = "Discovered a Hugging Face Access token, which could lead to unauthorized access to AI models and sensitive data."
-regex = '''\b(hf_(?i:[a-z]{34}))(?:[\x60'"\s;]|\\[nr]|$)'''
-entropy = 2
-keywords = ["hf_"]
-
-[[rules]]
-id = "huggingface-organization-api-token"
-description = "Uncovered a Hugging Face Organization API token, potentially compromising AI organization accounts and associated data."
-regex = '''\b(api_org_(?i:[a-z]{34}))(?:[\x60'"\s;]|\\[nr]|$)'''
-entropy = 2
-keywords = ["api_org_"]
-
-[[rules]]
-id = "infracost-api-token"
-description = "Detected an Infracost API Token, risking unauthorized access to cloud cost estimation tools and financial data."
-regex = '''\b(ico-[a-zA-Z0-9]{32})(?:[\x60'"\s;]|\\[nr]|$)'''
-entropy = 3
-keywords = ["ico-"]
-
-[[rules]]
-id = "intercom-api-key"
-description = "Identified an Intercom API Token, which could compromise customer communication channels and data privacy."
-regex = '''(?i)[\w.-]{0,50}?(?:intercom)(?:[ \t\w.-]{0,20})[\s'"]{0,3}(?:=|>|:{1,3}=|\|\||:|=>|\?=|,)[\x60'"\s=]{0,5}([a-z0-9=_\-]{60})(?:[\x60'"\s;]|\\[nr]|$)'''
-keywords = ["intercom"]
-
-[[rules]]
-id = "intra42-client-secret"
-description = "Found a Intra42 client secret, which could lead to unauthorized access to the 42School API and sensitive data."
-regex = '''\b(s-s4t2(?:ud|af)-(?i)[abcdef0123456789]{64})(?:[\x60'"\s;]|\\[nr]|$)'''
-entropy = 3
-keywords = [
- "intra",
- "s-s4t2ud-",
- "s-s4t2af-",
-]
-
-[[rules]]
-id = "jfrog-api-key"
-description = "Found a JFrog API Key, posing a risk of unauthorized access to software artifact repositories and build pipelines."
-regex = '''(?i)[\w.-]{0,50}?(?:jfrog|artifactory|bintray|xray)(?:[ \t\w.-]{0,20})[\s'"]{0,3}(?:=|>|:{1,3}=|\|\||:|=>|\?=|,)[\x60'"\s=]{0,5}([a-z0-9]{73})(?:[\x60'"\s;]|\\[nr]|$)'''
-keywords = [
- "jfrog",
- "artifactory",
- "bintray",
- "xray",
-]
-
-[[rules]]
-id = "jfrog-identity-token"
-description = "Discovered a JFrog Identity Token, potentially compromising access to JFrog services and sensitive software artifacts."
-regex = '''(?i)[\w.-]{0,50}?(?:jfrog|artifactory|bintray|xray)(?:[ \t\w.-]{0,20})[\s'"]{0,3}(?:=|>|:{1,3}=|\|\||:|=>|\?=|,)[\x60'"\s=]{0,5}([a-z0-9]{64})(?:[\x60'"\s;]|\\[nr]|$)'''
-keywords = [
- "jfrog",
- "artifactory",
- "bintray",
- "xray",
-]
-
-[[rules]]
-id = "jwt"
-description = "Uncovered a JSON Web Token, which may lead to unauthorized access to web applications and sensitive user data."
-regex = '''\b(ey[a-zA-Z0-9]{17,}\.ey[a-zA-Z0-9\/\\_-]{17,}\.(?:[a-zA-Z0-9\/\\_-]{10,}={0,2})?)(?:[\x60'"\s;]|\\[nr]|$)'''
-entropy = 3
-keywords = ["ey"]
-
-[[rules]]
-id = "jwt-base64"
-description = "Detected a Base64-encoded JSON Web Token, posing a risk of exposing encoded authentication and data exchange information."
-regex = '''\bZXlK(?:(?PaGJHY2lPaU)|(?PaGNIVWlPaU)|(?PaGNIWWlPaU)|(?PaGRXUWlPaU)|(?PaU5qUWlP)|(?PamNtbDBJanBi)|(?PamRIa2lPaU)|(?PbGNHc2lPbn)|(?PbGJtTWlPaU)|(?PcWEzVWlPaU)|(?PcWQyc2lPb)|(?PcGMzTWlPaU)|(?PcGRpSTZJ)|(?PcmFXUWlP)|(?PclpYbGZiM0J6SWpwY)|(?PcmRIa2lPaUp)|(?PdWIyNWpaU0k2)|(?Pd01tTWlP)|(?Pd01uTWlPaU)|(?Pd2NIUWlPaU)|(?PemRXSWlPaU)|(?PemRuUWlP)|(?PMFlXY2lPaU)|(?PMGVYQWlPaUp)|(?PMWNtd2l)|(?P
-
-
-
-
-
-### Introduction
-
-The Infisical CLI is a powerful command line tool that can be used to retrieve, modify, export and inject secrets into any process or application as environment variables. You can use it across various environments, whether it’s local development, CI/CD, staging, or production.
-
-### Installation
-
-The Infisical CLI NPM package serves as a new installation method in addition to our [existing installation methods](https://infisical.com/docs/cli/overview).
-
-After installing the CLI with the command below, you'll be able to use the infisical CLI across your machine.
-
-```bash
-$ npm install -g @infisical/cli
-```
-
-Full example:
-```bash
-# Install the Infisical CLI
-$ npm install -g @infisical/cli
-
-# Authenticate with the Infisical CLI
-$ infisical login
-
-# Initialize your Infisical CLI
-$ infisical init
-
-# List your secrets with Infisical CLI
-$ infisical secrets
-```
-
-
-### Documentation
-Our full CLI documentation can be found [here](https://infisical.com/docs/cli/usage).
\ No newline at end of file
diff --git a/npm/package-lock.json b/npm/package-lock.json
deleted file mode 100644
index 0c3dea6ef..000000000
--- a/npm/package-lock.json
+++ /dev/null
@@ -1,141 +0,0 @@
-{
- "name": "@infisical/cli",
- "version": "0.0.0",
- "lockfileVersion": 3,
- "requires": true,
- "packages": {
- "": {
- "name": "@infisical/cli",
- "version": "0.0.0",
- "hasInstallScript": true,
- "dependencies": {
- "tar": "^6.2.0",
- "yauzl": "^3.2.0"
- },
- "bin": {
- "infisical": "bin/infisical"
- }
- },
- "node_modules/buffer-crc32": {
- "version": "0.2.13",
- "resolved": "https://registry.npmjs.org/buffer-crc32/-/buffer-crc32-0.2.13.tgz",
- "integrity": "sha512-VO9Ht/+p3SN7SKWqcrgEzjGbRSJYTx+Q1pTQC0wrWqHx0vpJraQ6GtHx8tvcg1rlK1byhU5gccxgOgj7B0TDkQ==",
- "license": "MIT",
- "engines": {
- "node": "*"
- }
- },
- "node_modules/chownr": {
- "version": "2.0.0",
- "resolved": "https://registry.npmjs.org/chownr/-/chownr-2.0.0.tgz",
- "integrity": "sha512-bIomtDF5KGpdogkLd9VspvFzk9KfpyyGlS8YFVZl7TGPBHL5snIOnxeshwVgPteQ9b4Eydl+pVbIyE1DcvCWgQ==",
- "engines": {
- "node": ">=10"
- }
- },
- "node_modules/fs-minipass": {
- "version": "2.1.0",
- "resolved": "https://registry.npmjs.org/fs-minipass/-/fs-minipass-2.1.0.tgz",
- "integrity": "sha512-V/JgOLFCS+R6Vcq0slCuaeWEdNC3ouDlJMNIsacH2VtALiu9mV4LPrHc5cDl8k5aw6J8jwgWWpiTo5RYhmIzvg==",
- "dependencies": {
- "minipass": "^3.0.0"
- },
- "engines": {
- "node": ">= 8"
- }
- },
- "node_modules/fs-minipass/node_modules/minipass": {
- "version": "3.3.6",
- "resolved": "https://registry.npmjs.org/minipass/-/minipass-3.3.6.tgz",
- "integrity": "sha512-DxiNidxSEK+tHG6zOIklvNOwm3hvCrbUrdtzY74U6HKTJxvIDfOUL5W5P2Ghd3DTkhhKPYGqeNUIh5qcM4YBfw==",
- "dependencies": {
- "yallist": "^4.0.0"
- },
- "engines": {
- "node": ">=8"
- }
- },
- "node_modules/minipass": {
- "version": "5.0.0",
- "resolved": "https://registry.npmjs.org/minipass/-/minipass-5.0.0.tgz",
- "integrity": "sha512-3FnjYuehv9k6ovOEbyOswadCDPX1piCfhV8ncmYtHOjuPwylVWsghTLo7rabjC3Rx5xD4HDx8Wm1xnMF7S5qFQ==",
- "engines": {
- "node": ">=8"
- }
- },
- "node_modules/minizlib": {
- "version": "2.1.2",
- "resolved": "https://registry.npmjs.org/minizlib/-/minizlib-2.1.2.tgz",
- "integrity": "sha512-bAxsR8BVfj60DWXHE3u30oHzfl4G7khkSuPW+qvpd7jFRHm7dLxOjUk1EHACJ/hxLY8phGJ0YhYHZo7jil7Qdg==",
- "dependencies": {
- "minipass": "^3.0.0",
- "yallist": "^4.0.0"
- },
- "engines": {
- "node": ">= 8"
- }
- },
- "node_modules/minizlib/node_modules/minipass": {
- "version": "3.3.6",
- "resolved": "https://registry.npmjs.org/minipass/-/minipass-3.3.6.tgz",
- "integrity": "sha512-DxiNidxSEK+tHG6zOIklvNOwm3hvCrbUrdtzY74U6HKTJxvIDfOUL5W5P2Ghd3DTkhhKPYGqeNUIh5qcM4YBfw==",
- "dependencies": {
- "yallist": "^4.0.0"
- },
- "engines": {
- "node": ">=8"
- }
- },
- "node_modules/mkdirp": {
- "version": "1.0.4",
- "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-1.0.4.tgz",
- "integrity": "sha512-vVqVZQyf3WLx2Shd0qJ9xuvqgAyKPLAiqITEtqW0oIUjzo3PePDd6fW9iFz30ef7Ysp/oiWqbhszeGWW2T6Gzw==",
- "bin": {
- "mkdirp": "bin/cmd.js"
- },
- "engines": {
- "node": ">=10"
- }
- },
- "node_modules/pend": {
- "version": "1.2.0",
- "resolved": "https://registry.npmjs.org/pend/-/pend-1.2.0.tgz",
- "integrity": "sha512-F3asv42UuXchdzt+xXqfW1OGlVBe+mxa2mqI0pg5yAHZPvFmY3Y6drSf/GQ1A86WgWEN9Kzh/WrgKa6iGcHXLg==",
- "license": "MIT"
- },
- "node_modules/tar": {
- "version": "6.2.0",
- "resolved": "https://registry.npmjs.org/tar/-/tar-6.2.0.tgz",
- "integrity": "sha512-/Wo7DcT0u5HUV486xg675HtjNd3BXZ6xDbzsCUZPt5iw8bTQ63bP0Raut3mvro9u+CUyq7YQd8Cx55fsZXxqLQ==",
- "dependencies": {
- "chownr": "^2.0.0",
- "fs-minipass": "^2.0.0",
- "minipass": "^5.0.0",
- "minizlib": "^2.1.1",
- "mkdirp": "^1.0.3",
- "yallist": "^4.0.0"
- },
- "engines": {
- "node": ">=10"
- }
- },
- "node_modules/yallist": {
- "version": "4.0.0",
- "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz",
- "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A=="
- },
- "node_modules/yauzl": {
- "version": "3.2.0",
- "resolved": "https://registry.npmjs.org/yauzl/-/yauzl-3.2.0.tgz",
- "integrity": "sha512-Ow9nuGZE+qp1u4JIPvg+uCiUr7xGQWdff7JQSk5VGYTAZMDe2q8lxJ10ygv10qmSj031Ty/6FNJpLO4o1Sgc+w==",
- "license": "MIT",
- "dependencies": {
- "buffer-crc32": "~0.2.3",
- "pend": "~1.2.0"
- },
- "engines": {
- "node": ">=12"
- }
- }
- }
-}
diff --git a/npm/package.json b/npm/package.json
deleted file mode 100644
index 0b9d0bbaf..000000000
--- a/npm/package.json
+++ /dev/null
@@ -1,25 +0,0 @@
-{
- "name": "@infisical/cli",
- "private": false,
- "version": "0.0.0",
- "keywords": [
- "infisical",
- "cli",
- "command-line"
- ],
- "bin": {
- "infisical": "./bin/infisical"
- },
- "repository": {
- "type": "git",
- "url": "https://github.com/Infisical/infisical.git"
- },
- "author": "Infisical Inc, ",
- "scripts": {
- "preinstall": "node src/index.cjs"
- },
- "dependencies": {
- "tar": "^6.2.0",
- "yauzl": "^3.2.0"
- }
-}
diff --git a/npm/src/index.cjs b/npm/src/index.cjs
deleted file mode 100644
index f1ff51069..000000000
--- a/npm/src/index.cjs
+++ /dev/null
@@ -1,166 +0,0 @@
-const childProcess = require("child_process");
-const fs = require("fs");
-const stream = require("node:stream");
-const tar = require("tar");
-const path = require("path");
-const zlib = require("zlib");
-const yauzl = require("yauzl");
-
-const packageJSON = require("../package.json");
-
-const supportedPlatforms = ["linux", "darwin", "win32", "freebsd", "windows"];
-const outputDir = "bin";
-
-const getPlatform = () => {
- let platform = process.platform;
-
- if (platform === "win32") {
- platform = "windows";
- }
-
- if (!supportedPlatforms.includes(platform)) {
- console.error("Your platform doesn't seem to be of type darwin, linux or windows");
- process.exit(1);
- }
- return platform;
-};
-
-const getArchitecture = () => {
- const architecture = process.arch;
- let arch = "";
-
- if (architecture === "x64" || architecture === "amd64") {
- arch = "amd64";
- } else if (architecture === "arm64") {
- arch = "arm64";
- } else if (architecture === "arm") {
- // If the platform is Linux, we should find the exact ARM version, otherwise we default to armv7 which is the most common
- if (process.platform === "linux" || process.platform === "freebsd") {
- const output = childProcess.execSync("uname -m").toString().trim();
-
- const armVersions = ["armv5", "armv6", "armv7"];
-
- const armVersion = armVersions.find(version => output.startsWith(version));
-
- if (armVersion) {
- arch = armVersion;
- } else {
- arch = "armv7";
- }
- } else {
- arch = "armv7";
- }
- } else if (architecture === "ia32") {
- arch = "i386";
- } else {
- console.error("Your architecture doesn't seem to be supported. Your architecture is", architecture);
- process.exit(1);
- }
-
- return arch;
-};
-
-async function extractZip(buffer, targetPath) {
- return new Promise((resolve, reject) => {
- yauzl.fromBuffer(buffer, { lazyEntries: true }, (err, zipfile) => {
- if (err) return reject(err);
-
- zipfile.readEntry();
- zipfile.on("entry", entry => {
- const isExecutable = entry.fileName === "infisical" || entry.fileName === "infisical.exe";
-
- if (/\/$/.test(entry.fileName) || !isExecutable) {
- // Directory entry
- zipfile.readEntry();
- } else {
- // File entry
- zipfile.openReadStream(entry, (err, readStream) => {
- if (err) return reject(err);
-
- let fileName = entry.fileName;
-
- if (entry.fileName.endsWith(".exe")) {
- fileName = "infisical.exe";
- } else if (entry.fileName.includes("infisical")) {
- fileName = "infisical";
- }
-
- const outputPath = path.join(targetPath, fileName);
- const writeStream = fs.createWriteStream(outputPath);
-
- readStream.pipe(writeStream);
- writeStream.on("close", () => {
- zipfile.readEntry();
- });
- });
- }
- });
-
- zipfile.on("end", resolve);
- zipfile.on("error", reject);
- });
- });
-}
-
-async function main() {
- const PLATFORM = getPlatform();
- const ARCH = getArchitecture();
- const NUMERIC_RELEASE_VERSION = packageJSON.version;
- const LATEST_RELEASE_VERSION = `v${NUMERIC_RELEASE_VERSION}`;
- const EXTENSION = PLATFORM === "windows" ? "zip" : "tar.gz";
- const downloadLink = `https://github.com/Infisical/infisical/releases/download/infisical-cli/${LATEST_RELEASE_VERSION}/infisical_${NUMERIC_RELEASE_VERSION}_${PLATFORM}_${ARCH}.${EXTENSION}`;
-
- // Ensure the output directory exists
- if (!fs.existsSync(outputDir)) {
- fs.mkdirSync(outputDir);
- }
-
- // Download the latest CLI binary
- try {
- const response = await fetch(downloadLink, {
- headers: {
- Accept: "application/octet-stream"
- }
- });
-
- if (!response.ok) {
- throw new Error(`Failed to fetch: ${response.status} - ${response.statusText}`);
- }
-
- if (EXTENSION === "zip") {
- // For ZIP files, we need to buffer the whole thing first
- const buffer = await response.arrayBuffer();
- await extractZip(Buffer.from(buffer), outputDir);
- } else {
- // For tar.gz files, we stream
- await new Promise((resolve, reject) => {
- const outStream = stream.Readable.fromWeb(response.body)
- .pipe(zlib.createGunzip())
- .pipe(
- tar.x({
- C: path.join(outputDir),
- filter: path => path === "infisical"
- })
- );
-
- outStream.on("error", reject);
- outStream.on("close", resolve);
- });
- }
-
- // Platform-specific tasks
- if (PLATFORM === "windows") {
- // We create an empty file called 'infisical'. This file has no functionality, except allowing NPM to correctly create the symlink.
- // Reason why this doesn't work without the empty file, is because the files downloaded are a .ps1, .exe, and .cmd file. None of these match the binary name from the package.json['bin'] field.
- // This is a bit hacky, but it assures that the symlink is correctly created.
- fs.closeSync(fs.openSync(path.join(outputDir, "infisical"), "w"));
- } else {
- // Unix systems only need chmod
- fs.chmodSync(path.join(outputDir, "infisical"), "755");
- }
- } catch (error) {
- console.error("Error downloading or extracting Infisical CLI:", error);
- process.exit(1);
- }
-}
-main();