Skip to content
Merged
72 changes: 72 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
name: CI

on:
push:
branches:
- main
pull_request:
branches:
- main

jobs:
compile:
timeout-minutes: 10
runs-on: ubuntu-latest
name: Compile

steps:
- name: Checkout
uses: actions/checkout@v4

- name: Set Node.js version to 24
uses: actions/setup-node@v4
with:
node-version: 24

- name: Install dependencies
run: npm install

- name: Compile
run: npm run compile

test:
timeout-minutes: 10
runs-on: macos-latest
name: Test
needs: compile

steps:
- name: Checkout
uses: actions/checkout@v4

- name: Set Node.js version to 24
uses: actions/setup-node@v4
with:
node-version: 24

- name: Install dependencies
run: npm install

- name: Run tests
run: npm test

prettier:
timeout-minutes: 10
runs-on: ubuntu-latest
name: Prettier Check
needs: compile

steps:
- name: Checkout
uses: actions/checkout@v4

- name: Set Node.js version to 24
uses: actions/setup-node@v4
with:
node-version: 24

- name: Install dependencies
run: npm install

- name: Run Prettier check
run: npm run prettier-check
9 changes: 3 additions & 6 deletions .vscode/extensions.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
{
// See http://go.microsoft.com/fwlink/?LinkId=827846
// for the documentation about the extensions.json format
"recommendations": [
"dbaeumer.vscode-eslint",
"ms-vscode.extension-test-runner"
]
// See http://go.microsoft.com/fwlink/?LinkId=827846
// for the documentation about the extensions.json format
"recommendations": ["dbaeumer.vscode-eslint", "ms-vscode.extension-test-runner"]
}
26 changes: 11 additions & 15 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,19 +3,15 @@
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
{
"version": "0.2.0",
"configurations": [
{
"name": "Run Extension",
"type": "extensionHost",
"request": "launch",
"args": [
"--extensionDevelopmentPath=${workspaceFolder}"
],
"outFiles": [
"${workspaceFolder}/out/**/*.js"
],
"preLaunchTask": "${defaultBuildTask}"
}
]
"version": "0.2.0",
"configurations": [
{
"name": "Run Extension",
"type": "extensionHost",
"request": "launch",
"args": ["--extensionDevelopmentPath=${workspaceFolder}"],
"outFiles": ["${workspaceFolder}/out/**/*.js"],
"preLaunchTask": "${defaultBuildTask}"
}
]
}
16 changes: 8 additions & 8 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
// Place your settings in this file to overwrite default and user settings.
{
"files.exclude": {
"out": false // set this to true to hide the "out" folder with the compiled JS files
},
"search.exclude": {
"out": true // set this to false to include "out" folder in search results
},
// Turn off tsc task auto detection since we have the necessary tasks as npm scripts
"typescript.tsc.autoDetect": "off"
"files.exclude": {
"out": false // set this to true to hide the "out" folder with the compiled JS files
},
"search.exclude": {
"out": true // set this to false to include "out" folder in search results
},
// Turn off tsc task auto detection since we have the necessary tasks as npm scripts
"typescript.tsc.autoDetect": "off"
}
32 changes: 16 additions & 16 deletions .vscode/tasks.json
Original file line number Diff line number Diff line change
@@ -1,20 +1,20 @@
// See https://go.microsoft.com/fwlink/?LinkId=733558
// for the documentation about the tasks.json format
{
"version": "2.0.0",
"tasks": [
{
"type": "npm",
"script": "watch",
"problemMatcher": "$tsc-watch",
"isBackground": true,
"presentation": {
"reveal": "never"
},
"group": {
"kind": "build",
"isDefault": true
}
}
]
"version": "2.0.0",
"tasks": [
{
"type": "npm",
"script": "watch",
"problemMatcher": "$tsc-watch",
"isBackground": true,
"presentation": {
"reveal": "never"
},
"group": {
"kind": "build",
"isDefault": true
}
}
]
}
3 changes: 1 addition & 2 deletions .vscodeignore
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
.vscode/**
.vscode-test/**
src/**
tests/**
!src/assets/**
.gitignore
.yarnrc
vsc-extension-quickstart.md
**/tsconfig.json
**/eslint.config.mjs
**/*.map
Expand Down
25 changes: 25 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,31 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [0.1.4] - 2026-02-10

### Added

- Added `enableStrictSecretScanning` setting (and corresponding `toggleStrictSecretScanning` command) that, when enabled, makes secret scanning skip files that don't have a common secret indicator (like "API_SECRET").
- Added `.svelte`, `.txt`, and `.toml` to the default list of scanned file extensions.

### Changed

- GitGerbil will now wait for up to 5 seconds to detect a git repo when activating instead of immediately failing.
- File extensions like `.test.ts` will be correctly detected as `.ts` files now and scanned if the base extension is in the list of scanned file types.
- Submitting an empty field when running `gitgerbil.setScannedFileTypes` will now reset to the default list of scanned file types instead of an empty list.
- Updated the README to mention `gitgerbil-ignore-file`.
- `.env.example` files will no longer be flagged by file path scanning.
- Fixed file name detection for files nested in subdirectories.

### Removed

- Replaced `enable` and `disable` commands (i.e. `gitgerbil.enableSecretScanning`) with `toggle` commands.
- `gitgerbil.toggleFilePathScanning`
- `gitgerbil.toggleSecretScanning`
- `gitgerbil.toggleStrictSecretScanning`
- `gitgerbil.toggleCommentScanning`
- Removed SQL from comment scanning.

## [0.1.3] - 2026-02-08

### Added
Expand Down
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,8 @@ Also also scans for TODO or FIXME comments in your code and gives a friendly rem
> \[!TIP\]
>
> GitGerbil can have false positives. To ignore a line, add `// gitgerbil-ignore-line` above it (or whatever comment syntax your language uses).
>
> Or to ignore an entire file, add `// gitgerbil-ignore-file` at the top of the file.

## Extension Settings

Expand Down
43 changes: 23 additions & 20 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "gitgerbil",
"displayName": "GitGerbil",
"description": "Scan your project for potential secrets, sensitive information, and less-than-ideal files that you probably shouldn't commit.",
"version": "0.1.3",
"version": "0.1.4",
"publisher": "KennethNg",
"icon": "./src/assets/icon.png",
"repository": {
Expand All @@ -22,16 +22,19 @@
"vscode:prepublish": "npm run compile",
"compile": "tsc -p ./",
"watch": "tsc -watch -p ./",
"prettier-check": "prettier . --check",
"unit-test": "mocha ./out/tests/unit",
"integration-test": "node ./out/tests/runTests.js",
"pretest": "npm run compile",
"test": "node ./out/test/runTests.js"
"test": "npm run unit-test && npm run integration-test"
},
"devDependencies": {
"@types/mocha": "^10.0.10",
"@types/node": "25.x",
"@types/vscode": "^1.90.0",
"@vscode/test-electron": "^2.5.2",
"mocha": "^11.7.5",
"tsx": "^4.21.0",
"prettier": "^3.8.1",
"typescript": "^5.8.3"
},
"extensionDependencies": [
Expand All @@ -50,6 +53,7 @@
"jsx",
"tsx",
"vue",
"svelte",
"py",
"rb",
"go",
Expand All @@ -67,7 +71,9 @@
"json",
"yaml",
"yml",
"md"
"md",
"txt",
"toml"
],
"description": "List of file extensions that will be scanned if any scanning options are enabled. Dotfiles are automatically included and do not need to be specified here."
},
Expand All @@ -81,6 +87,11 @@
"default": true,
"description": "Enable or disable secret scanning in tracked git files. If enabled, errors will be shown where potential secrets are found."
},
"gitgerbil.enableStrictSecretScanning": {
"type": "boolean",
"default": true,
"description": "Enable or disable strict secret scanning in tracked git files. If enabled, secret scanning will only run if potential secret indicators are found in the content. Does nothing if secret scanning is disabled."
},
"gitgerbil.enableCommentScanning": {
"type": "boolean",
"default": true,
Expand All @@ -94,28 +105,20 @@
"title": "GitGerbil: Set Scanned File Types"
},
{
"command": "gitgerbil.enableFilePathScanning",
"title": "GitGerbil: Enable File Path Scanning"
},
{
"command": "gitgerbil.disableFilePathScanning",
"title": "GitGerbil: Disable File Path Scanning"
},
{
"command": "gitgerbil.enableSecretScanning",
"title": "GitGerbil: Enable Secret Scanning"
"command": "gitgerbil.toggleFilePathScanning",
"title": "GitGerbil: Toggle File Path Scanning"
},
{
"command": "gitgerbil.disableSecretScanning",
"title": "GitGerbil: Disable Secret Scanning"
"command": "gitgerbil.toggleSecretScanning",
"title": "GitGerbil: Toggle Secret Scanning"
},
{
"command": "gitgerbil.enableCommentScanning",
"title": "GitGerbil: Enable Comment Scanning"
"command": "gitgerbil.toggleStrictSecretScanning",
"title": "GitGerbil: Toggle Strict Secret Scanning"
},
{
"command": "gitgerbil.disableCommentScanning",
"title": "GitGerbil: Disable Comment Scanning"
"command": "gitgerbil.toggleCommentScanning",
"title": "GitGerbil: Toggle Comment Scanning"
}
]
}
Expand Down
Loading