Skip to content

Commit 25a302c

Browse files
authored
Document exclusion of paths from scans (#356)
1 parent 0b79e15 commit 25a302c

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed

README.md

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -917,6 +917,24 @@ git push --no-verify
917917
> [!TIP]
918918
> The pre-push hook is triggered on `git push` command and scans only the commits that are about to be pushed, making it more efficient than scanning the entire repository.
919919
920+
## Exclude Paths From Scans
921+
You can use a `.cycodeignore` file to tell the Cycode CLI which files and directories to exclude from scans.
922+
It works just like a `.gitignore` file. This helps you focus scans on your relevant code and prevent certain paths from triggering violations locally.
923+
924+
### How It Works
925+
1. Create a file named `.cycodeignore` in your workfolder.
926+
2. List the files and directories you want to exclude, using the same patterns as `.gitignore`.
927+
3. Place this file in the directory where you plan to run the cycode scan command.
928+
929+
> [!WARNING]
930+
> - **Invalid files**: If the `.cycodeignore` file contains a syntax error, the CLI scan will fail and return an error.
931+
> - **Ignoring paths vs. violations**: This file is for excluding paths. It's different from the CLI's capability to ignore specific violations (for example, by using the --ignore-violation flag).
932+
933+
### Supported Scanners
934+
- SAST
935+
- Iac (comming soon)
936+
- SCA (comming soon)
937+
920938
## Scan Results
921939
922940
Each scan will complete with a message stating if any issues were found or not.

0 commit comments

Comments
 (0)