You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: new-docs/src/content/docs/codacy-guardrails/codacy-guardrails-faq.md
+1-6Lines changed: 1 addition & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,10 +2,8 @@
2
2
title: FAQs
3
3
---
4
4
5
-
# FAQs
6
-
7
5
## How do I install Codacy Guardrails?
8
-
Please have a look at our [documentation](codacy-guardrails-getting-started.md)
6
+
Please have a look at our [documentation](codacy-guardrails-getting-started.md).
9
7
10
8
## Does Guardrails only work with AI-generated code?
11
9
No. While Guardrails does scan and autofix AI code as part of the agent flow, it scans any code shown in your IDE in real-time, regardless of how it was written.
@@ -19,7 +17,6 @@ Yes, local scanning via Codacy CLI works offline. API-based features (like query
19
17
## Which AI security and quality standards can I enforce with Guardrails?
20
18
Codacy Guardrails detects and autoremediate security risks and quality issues in JavaScript, TypeScript, Python, and Java, including:
21
19
22
-
23
20
- SAST vulnerabilities
24
21
- Hardcoded secrets
25
22
- Insecure dependencies
@@ -52,7 +49,6 @@ Codacy Guardrails is a free IDE Extension for local scanning of AI-generated and
52
49
53
50
Check our [Team and Organization plans](https://www.codacy.com/pricing) to unlock:
54
51
55
-
56
52
- Central configuration and enforcement of AI coding standards across teams and projects
57
53
- Query and autofix existing problems across your codebase from the AI chat panel
58
54
- Generate custom security and code quality reports using AI prompts
@@ -77,7 +73,6 @@ Without an AI coding agent, you can still use the IDE extension for local analys
77
73
78
74
If you wish to continue using a previous version a little longer, you can do so by:
Copy file name to clipboardExpand all lines: new-docs/src/content/docs/codacy-guardrails/codacy-guardrails-getting-started.md
+46-36Lines changed: 46 additions & 36 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,15 +2,13 @@
2
2
title: Getting Started
3
3
---
4
4
5
-
# Getting Started
6
-
7
5
Codacy Guardrails is a brand new way of enforcing code security and quality standards for AI-generated code, built into the free Codacy IDE Extension for VSCode, Copilot, Cursor, and Windsurf. Guardrails help developers ship safer, cleaner AI code by applying best practices and blocking insecure patterns while the code is being generated.
8
6
9
7
Besides real-time AI code scanning, Guardrails users can now prompt all their Codacy findings, without ever leaving the AI chat panel inside their IDE.
10
8
11
9
**New to Codacy Guardrails?**[Check our blog post](https://blog.codacy.com/codacy-guardrails-free-real-time-enforcement-of-security-and-quality-standards)
12
10
13
-
<iframewidth="560"height="315"src="https://www.youtube.com/embed/uVyRWnnJu-0?si=Pnbk65EvpvvJRXX4"title="YouTube video player"frameborder="0"allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share"referrerpolicy="strict-origin-when-cross-origin"allowfullscreen></iframe>
11
+
<iframewidth="560"height="315"style="height: 315px"src="https://www.youtube.com/embed/uVyRWnnJu-0?si=Pnbk65EvpvvJRXX4"title="YouTube video player"frameborder="0"allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share"referrerpolicy="strict-origin-when-cross-origin"allowfullscreen></iframe>
14
12
15
13
16
14
# VSCode-based IDEs
@@ -27,9 +25,10 @@ Besides real-time AI code scanning, Guardrails users can now prompt all their Co
27
25
- Linux
28
26
- Windows (via WSL)
29
27
30
-
!!! important
31
-
**For Windows users: Windows WSL** (a feature that allows you to run a Linux environment directly on Windows, without the need for a virtual machine or dual-boot setup) is the only way you can use this feature for now, but we're still working to fully support Windows.
32
-
We currently only support VSCode, Cursor, and Windsurf on Windows.
28
+
:::caution
29
+
**For Windows users: Windows WSL** (a feature that allows you to run a Linux environment directly on Windows, without the need for a virtual machine or dual-boot setup) is the only way you can use this feature for now, but we're still working to fully support Windows.
30
+
We currently only support VSCode, Cursor, and Windsurf on Windows.
31
+
:::
33
32
34
33
35
34
### Supported IDEs
@@ -38,8 +37,9 @@ Besides real-time AI code scanning, Guardrails users can now prompt all their Co
38
37
- Cursor
39
38
- Windsurf
40
39
41
-
!!! note
42
-
For Visual Studio Code, the Insiders version is recommended for its faster performance and compatibility with Codacy Guardrails. However, since it's a beta version, you may encounter occasional issues.
40
+
:::note
41
+
For Visual Studio Code, the Insiders version is recommended for its faster performance and compatibility with Codacy Guardrails. However, since it's a beta version, you may encounter occasional issues.
42
+
:::
43
43
44
44
### Built-in Scanners
45
45
@@ -52,7 +52,7 @@ Besides real-time AI code scanning, Guardrails users can now prompt all their Co
## How to install - Quick Guide {: id="how-to-install-quick-guide"}
55
+
## How to install - Quick Guide {#how-to-install-quick-guide}
56
56
57
57
#### Note for Windows users:
58
58
To take advantage of Codacy Guardrails on Windows, you might need to setup WSL first, [check the steps here.](#how-to-install-wsl)
@@ -80,11 +80,13 @@ It will create a folder in your local repository called **.codacy** with all nee
80
80
- The configuration from all built-in scanners
81
81
- Codacy CLI script to run analysis locally
82
82
83
-
!!! note
84
-
If you don't want this folder to be part of your repository in future commits but continue working with it locally, please add **.codacy** to your .gitignore file
83
+
:::note
84
+
If you don't want this folder to be part of your repository in future commits but continue working with it locally, please add **.codacy** to your .gitignore file
85
+
:::
85
86
86
-
!!! note
87
-
The IDE extension will ignore any CLI version already installed (e.g. through brew or other package manager) on the machine.
87
+
:::note
88
+
The IDE extension will ignore any CLI version already installed (e.g. through brew or other package manager) on the machine.
89
+
:::
88
90
89
91
90
92
### 3. Check if the Codacy MCP Server is properly setup
@@ -95,8 +97,9 @@ If you don't want Guardrails to automatically generate the instructions file, go
The absence of the instructions file will impact the Guardrails experience.
100
+
:::warning
101
+
The absence of the instructions file will impact the Guardrails experience.
102
+
:::
100
103
101
104
You can later generate the instructions manually from the Guardrails section of the extension.
102
105
@@ -106,7 +109,7 @@ You can later generate the instructions manually from the Guardrails section of
106
109
* Remember that for you to be able to interact with Codacy MCP server, you must be on the `Agent` mode of the chat, not the default `Ask` mode.
107
110
* If you're still having issues with the MCP server, try to run the command `Preferences: Open User Settings (JSON)`, look for the Codacy MCP server settings and right on top of it you'll should see a `Start` option. Click on it and, if unsuccessful, go to `View > Debug Console` and check for errors. Don't forget to ensure you have `node.js` and `npx` installed and set up.
108
111
109
-
## How to install - WSL {: id="how-to-install-wsl"}
112
+
## How to install - WSL {#how-to-install-wsl}
110
113
111
114
### 1. Install or update [WSL.](https://learn.microsoft.com/en-us/windows/wsl/install)
112
115
@@ -117,7 +120,7 @@ You can later generate the instructions manually from the Guardrails section of
117
120
118
121
## How to install - Manually
119
122
120
-
### 1. Install and activate the Codacy CLI for local analysis {: id="install-cli"}
123
+
### 1. Install and activate the Codacy CLI for local analysis {#install-cli}
121
124
122
125
#### Download
123
126
@@ -150,12 +153,13 @@ Before running the analysis, install the specified tools:
150
153
codacy-cli install
151
154
```
152
155
153
-
### 2. Install MCP Server {: id="install-mcp-server"}
156
+
### 2. Install MCP Server {#install-mcp-server}
154
157
155
158
If you want to use MCP Server with a NPM package you should download it from [here](https://www.npmjs.com/package/@codacy/codacy-mcp)
156
159
157
-
!!! important
158
-
You can find some limitations using this approach because the AI doesn't automatically analyse the code generated unless there's a rule set for it to do so. When using the IDE extension (VS Code, Cursor, or Windsurf), we create those AI rules for the workspace, but if you are installing the MCP manually, you will need to create those rules by yourself. <ahref="mailto:support@codacy.com">Let us know if you you plan to use this approach, so we can provide more information</a>
160
+
:::caution
161
+
You can find some limitations using this approach because the AI doesn't automatically analyse the code generated unless there's a rule set for it to do so. When using the IDE extension (VS Code, Cursor, or Windsurf), we create those AI rules for the workspace, but if you are installing the MCP manually, you will need to create those rules by yourself. <ahref="mailto:support@codacy.com">Let us know if you you plan to use this approach, so we can provide more information</a>
162
+
:::
159
163
160
164
#### Setup
161
165
@@ -238,8 +242,9 @@ c. Open the Copilot chat and switch the mode to `Agent`. You can check that the
238
242
- Linux
239
243
- Windows (via WSL)
240
244
241
-
!!! important
242
-
**For Windows users: Windows WSL** (a feature that allows you to run a Linux environment directly on Windows, without the need for a virtual machine or dual-boot setup) is the only way you can use this feature for now, but we're still working to fully support Windows. **Only local analysis** are supported for Windows, as MCP support for JetBrains IDEs is still not completely done.
245
+
:::caution
246
+
**For Windows users: Windows WSL** (a feature that allows you to run a Linux environment directly on Windows, without the need for a virtual machine or dual-boot setup) is the only way you can use this feature for now, but we're still working to fully support Windows. **Only local analysis** are supported for Windows, as MCP support for JetBrains IDEs is still not completely done.
247
+
:::
243
248
244
249
245
250
### Supported IDEs
@@ -249,8 +254,9 @@ c. Open the Copilot chat and switch the mode to `Agent`. You can check that the
249
254
- PhpStorm
250
255
- Others in the suite
251
256
252
-
!!! note
253
-
For JetBrains IDEs, IntelliJ isn't the only supported editor, but is our primary focus. If you use other editors such as PyCharm and run into any issues, feel free to open an issue in our extension's [repository](https://github.com/codacy/codacy-intellij-extension). Check the [extension page](https://tinyurl.com/codacy-jetbrains-extension) on the marketplace to see the full list of supported IDEs.
257
+
:::note
258
+
For JetBrains IDEs, IntelliJ isn't the only supported editor, but is our primary focus. If you use other editors such as PyCharm and run into any issues, feel free to open an issue in our extension's [repository](https://github.com/codacy/codacy-intellij-extension). Check the [extension page](https://tinyurl.com/codacy-jetbrains-extension) on the marketplace to see the full list of supported IDEs.
259
+
:::
254
260
255
261
### Built-in Scanners
256
262
@@ -263,18 +269,18 @@ c. Open the Copilot chat and switch the mode to `Agent`. You can check that the
## How to install - JetBrains Quick Guide {: id="how-to-install-quick-guide-jetbrains"}
272
+
## How to install - JetBrains Quick Guide {#how-to-install-quick-guide-jetbrains}
267
273
268
274
#### Note for Windows users:
269
275
To take advantage of Codacy Guardrails on Windows, you need to set up WSL first; [check the steps here](#how-to-install-wsl). **Only local analysis** are supported for Windows, as MCP support for JetBrains IDEs is still not completely done.
270
276
271
277
### 1. Install the extension
272
278
273
-
274
279
You can either install the dependency from the [JetBrains marketplace](https://tinyurl.com/codacy-jetbrains-extension) or search for it directly in your Codacy plugin's settings.
275
280
276
-
!!! note
277
-
If you don’t see the Codacy plugin icon on the left taskbar after installing it, go to View > Tool Windows > Codacy
281
+
:::note
282
+
If you don’t see the Codacy plugin icon on the left taskbar after installing it, go to View > Tool Windows > Codacy
@@ -290,11 +296,13 @@ It will create a folder in your local repository called **.codacy** with all nee
290
296
- The configuration from all built-in scanners
291
297
- Codacy CLI script to run analysis locally
292
298
293
-
!!! note
294
-
If you don't want this folder to be part of your repository in future commits but continue working with it locally, please add **.codacy** to your .gitignore file
299
+
:::note
300
+
If you don't want this folder to be part of your repository in future commits but continue working with it locally, please add **.codacy** to your .gitignore file
301
+
:::
295
302
296
-
!!! note
297
-
The IDE extension will ignore any CLI version already installed (for example, through brew or other package manager) on the machine.
303
+
:::note
304
+
The IDE extension will ignore any CLI version already installed (for example, through brew or other package manager) on the machine.
305
+
:::
298
306
299
307
300
308
### 3. Install MCP Server
@@ -311,8 +319,9 @@ In your IntelliJ settings, search the settings for the agent of your choice (Jun
311
319
312
320

313
321
314
-
!!! note
315
-
You need to install the plugin for your desired agent. Make sure to install JetBrains Junie or GitHub Copilot if you want to integrate the Codacy MCP.
322
+
:::note
323
+
You need to install the plugin for your desired agent. Make sure to install JetBrains Junie or GitHub Copilot if you want to integrate the Codacy MCP.
324
+
:::
316
325
317
326
#### c. Confirm the settings of your Codacy extension
318
327
@@ -327,8 +336,9 @@ Install the guidelines by clicking on **Install AiAgent Guidelines** on the Coda
Copy file name to clipboardExpand all lines: new-docs/src/content/docs/codacy-guardrails/codacy-guardrails-how-to-configure-rules.md
+14-19Lines changed: 14 additions & 19 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,8 +2,6 @@
2
2
title: How to customize the analysis rules for Codacy Guardrails
3
3
---
4
4
5
-
# How to customize the analysis rules for Codacy Guardrails
6
-
7
5
By default, if no API token is provided in the [MCP Server setup](codacy-guardrails-getting-started.md/#3-install-mcp-server), Codacy uses a predefined configuration that includes all recommended rules (or [code patterns](../repositories-configure/configuring-code-patterns.md) that you can find on many parts of our product) from the supported built-in scanners.
8
6
9
7
However, when an API token is used, Codacy automatically retrieves the current rule configuration directly from your repository.
@@ -15,9 +13,9 @@ You can configure your rules in one of two ways:
15
13
16
14
- Using the [Codacy UI](#using-the-codacy-ui)–for quick, manual adjustments.
17
15
18
-
!!! note
19
-
If you're already using a configuration file, please we recommend you can follow the first way. Otherwise, the second way is the best for you, so you can configure directly in the Codacy platform.
20
-
16
+
:::note
17
+
If you're already using a configuration file, please we recommend you can follow the first way. Otherwise, the second way is the best for you, so you can configure directly in the Codacy platform.
18
+
:::
21
19
22
20
## Using configuration files
23
21
@@ -73,17 +71,13 @@ To use a configuration file for a static analysis tool:
73
71
74
72
2. Open the repository **Code patterns** page, select the tool of interest, and activate the toggle to use a configuration file.
75
73
76
-
!!! note
77
-
- After activating a configuration file for a tool, Codacy uses that configuration file even if you [exclude it from Codacy analysis](../repositories-configure/ignoring-files.md).
78
-
79
-
- When [using a tool configuration file alongside a coding standard](../organizations/using-coding-standards.md#using-with-tool-configuration), the configuration file controls the code patterns, while the coding standard controls whether the tool is enabled or disabled.
80
-
81
-
- Codacy uses the version of the configuration file **in the branch being analyzed**. For example, if you open a pull request that includes changes to the configuration file, the analysis results take those changes into account.
82
-
83
-
- If Codacy analyzes a branch that doesn't include the configuration file, Codacy reverts to using the code patterns configured for the tool before you selected the option **Configuration file** on the Code patterns page.
84
-
85
-
- For performance reasons, when you update pattern settings using a configuration file, Codacy may display outdated messages for issues identified previously by those patterns.
86
-
74
+
:::note
75
+
- After activating a configuration file for a tool, Codacy uses that configuration file even if you [exclude it from Codacy analysis](../repositories-configure/ignoring-files.md).
76
+
- When [using a tool configuration file alongside a coding standard](../organizations/using-coding-standards.md#using-with-tool-configuration), the configuration file controls the code patterns, while the coding standard controls whether the tool is enabled or disabled.
77
+
- Codacy uses the version of the configuration file **in the branch being analyzed**. For example, if you open a pull request that includes changes to the configuration file, the analysis results take those changes into account.
78
+
- If Codacy analyzes a branch that doesn't include the configuration file, Codacy reverts to using the code patterns configured for the tool before you selected the option **Configuration file** on the Code patterns page.
79
+
- For performance reasons, when you update pattern settings using a configuration file, Codacy may display outdated messages for issues identified previously by those patterns.
80
+
:::
87
81
88
82
89
83

@@ -135,6 +129,7 @@ Select the coding standards that you want to follow or stop following and click
Copy file name to clipboardExpand all lines: new-docs/src/content/docs/codacy-guardrails/codacy-guardrails-how-to-use.md
-4Lines changed: 0 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,8 +2,6 @@
2
2
title: Using Codacy Guardrails
3
3
---
4
4
5
-
# Using Codacy Guardrails
6
-
7
5
## Recommended configurations
8
6
9
7
<table>
@@ -63,7 +61,6 @@ c. After a new analysis, It shows us that it has 0 issues in the code
63
61
64
62
Once your repository is connected to Codacy, you can go beyond traditional static analysis and start interacting with your codebase using natural language prompts.
65
63
66
-
67
64
a. Let's run a quick example with the prompt:
68
65
69
66
```text
@@ -72,7 +69,6 @@ Can you list all security issues in my repository?
72
69
73
70

74
71
75
-
76
72
b. Right after running this prompt, there is a MCP tool call to search all security issues in my repository. Click in **Run tool**
77
73
78
74

Copy file name to clipboardExpand all lines: new-docs/src/content/docs/codacy-guardrails/codacy-guardrails-limitations.md
-2Lines changed: 0 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,8 +2,6 @@
2
2
title: Limitations
3
3
---
4
4
5
-
# Limitations
6
-
7
5
## Limitations with Windows
8
6
9
7
Windows WSL (a feature that allows you to run a Linux environment directly on Windows, without the need for a virtual machine or dual-boot setup) is the only way you can use this feature for now, but we're still working to fully support Windows. Additionally, at this point we're only supporting VSCode and VSCode-based IDEs on Windows.
0 commit comments