| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Name | Name | Last commit date | ||
|---|---|---|---|---|
If SecretStack helps you, consider giving us a ⭐ on GitHub! Your support encourages future development and helps others discover this tool!
SecretStack is a Visual Studio Code extension that easily scans your project for sensitive information such as API keys, passwords, tokens, and more. You can manually trigger scans to help secure your codebase by identifying potential secrets quickly.
🔍 Manual Scan Control
🧩 Custom Pattern Detection
📄 Comprehensive Logs
All scans are logged in the .secret-stack folder, including:
By default, .secret-stack is added to .gitignore to prevent accidental commits)
⏱️ Real-Time Feedback
🔐 Pre-Commit Scan Reminder
After installation, click the Find Exposed Secrets button in the status bar to start scanning your workspace for secrets.
You will be prompted to choose where to scan:
Select the desired option to start the scan.
After completing the scan, go to the .secret-stack folder:
You can customize how SecretStack works through your VSCode settings.
By default, SecretStack will ask if you want to add the .secret-stack folder to .gitignore. This is recommended to avoid committing sensitive log or report files by prompting user to run a scan before Git push. You can disable this behavior through the configuration.
"secret-stack.addToGitIgnore": false
To detect custom secrets, you can configure your own regex patterns. Add these patterns in your workspace settings (settings.json):
"secret-stack.customPatterns": [
{
"name": "Custom API Key",
"regex": "custom_api_[a-zA-Z0-9]{32}",
"severity": "High"
},
{
"name": "Internal Token",
"regex": "int-token-[0-9]{16}",
"severity": "Medium"
}
]You can add as many custom patterns as needed to suit your project’s requirements.
If you want to exclude certain files or folders from being scanned, you can specify them in your workspace settings.
"secret-stack.excludeFiles": [
"**/node_modules",
"**/dist",
"**/*.min.js",
"**/package-lock.json",
".git",
".vscode",
".secret-stack"
]
This helps prevent unnecessary scans of files that aren’t relevant to secret detection, such as build files or dependencies.
By default, SecretStack will prompt you to run a secret scan before pushing committed changes. You can configure the frequency of this prompt or disable it entirely. The available options are:
You can configure this behavior in your settings:
"secret-stack.promptToScanBeforePush": "always"
When you run a scan, SecretStack generates detailed logs and a comprehensive report to track the scanning process and provide insight into the results.
Logs are saved in the .secret-stack-result.log file located in the .secret-stack folder. This log file contains step-by-step details about the scan, including timestamps, files scanned, and any secrets detected. Below is an example of a log entry:
[2024-11-24T11:35:25.701Z] [INFO] ---------------------------- Workspace Scan started ---------------------------- [2024-11-24T11:35:25.767Z] [INFO] Found 1 files to scan. [2024-11-24T11:35:25.770Z] [WARNING] Secret detected: GitHub Token at line 7 in /home/user/sample-project/test.js [2024-11-24T11:35:25.772Z] [INFO] --------------- Workspace Scan completed: Exposed secrets found ---------------
In addition to the log, SecretStack generates a .secret-stack-report.html file. This HTML report provides a visually rich summary of the scan, displaying the detected secrets, their severity, risk levels, and the specific locations (file and line number) where they were found.
If SecretStack detects secrets that are false positives (e.g., test API keys, mock data, or other non-sensitive information), you can easily dismiss them. Simply click the "IGNORE" button in the webview to mark them as false positives. This action ensures that they are excluded from the scan results, logs, and final reports.
By ignoring false positives, you can maintain clean and accurate logs, ensuring that only actual security threats are flagged. This feature helps streamline the scan process and improves the accuracy of your reports.
This project is licensed under the Apache License, Version 2.0 - see the LICENSE file for details.
We welcome contributions! If you would like to contribute to SecretStack, please follow these steps:
Fork the Repository: Click the "Fork" button at the top-right of the repository page on GitHub.
Clone Your Fork:
Clone your forked repository to your local machine:
git clone https://github.com/<YourUsername>/secret-stack.gitCreate a New Branch:
Always create a new branch for your changes to keep your work organized and separate from the main branch:
git checkout -b your-branch-nameMake Your Changes: Implement your changes, whether it's fixing a bug, adding a feature, or improving the documentation.
Commit Your Changes: Once you’ve made your changes, stage and commit them with a descriptive message:
git add .
git commit -m "Brief description of the changes"Push Your Changes: Push your branch to your forked repository on GitHub:
git push origin your-branch-nameSubmit a Pull Request (PR):
Address Feedback: A maintainer will review your pull request. Be prepared to:
Sync Your Fork (Optional but Recommended): To keep your fork updated with the latest changes from the main repository, add the original repository as a remote:
git remote add upstream https://github.com/ArpitStack/secret-stack.gitFetch and merge the latest changes:
git fetch upstream
git merge upstream/mainFor more details on contributing, refer to the CONTRIBUTING.md file.
Thank you for your contribution!
For any questions or issues, please open an issue in the GitHub repository.
| Back | FazBrowse Home | New Git URL |