Skip to content

Commit 33b9228

Browse files
updated the config to add install guide for intellij+copilot and updated the java version in the docker file.
1 parent 902a2b1 commit 33b9228

File tree

3 files changed

+46
-5
lines changed

3 files changed

+46
-5
lines changed

Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ WORKDIR /app
33
COPY . .
44
RUN mvn clean package -DskipTests
55

6-
FROM eclipse-temurin:17-jre-alpine
6+
FROM eclipse-temurin:24-jre-alpine
77
WORKDIR /app
88

99
# Install the 'shadow' package to get groupadd and useradd

README.md

Lines changed: 45 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ docker run \
104104
### Using Copilot + Petclinic
105105
Download the Vulnerable Pet Clinic.
106106
`git clone https://github.com/Contrast-Security-OSS/vulnerable-spring-petclinic.git`
107-
Open the project in VSCode.
107+
Open the project in VSCode or Intellij.
108108
Edit the contrast_security.yaml file and configure it with your AGENT credentials
109109
```yaml
110110
api:
@@ -120,7 +120,7 @@ It will build and run the services that make up petclinic.
120120
To build out the vulnerabilites and attack events run
121121
`./testscript.sh`
122122
Select option 25. ( this will exercise the app and perform attacks to populate the vulnerabilities and attack events)
123-
#### Install via Link
123+
#### Install via Link in VScode
124124
Click following link >>> [![Install in VS Code Docker](https://img.shields.io/badge/VS_Code-docker-0098FF?style=flat-square&logo=githubcopilot&logoColor=white)](https://insiders.vscode.dev/redirect/mcp/install?name=contrastmcp&config=%7B%22command%22:%22docker%22,%22args%22:%5B%22run%22,%20%22-e%22,%22CONTRAST_HOST_NAME%22,%20%22-e%22,%22CONTRAST_API_KEY%22,%20%22-e%22,%22CONTRAST_SERVICE_KEY%22,%20%22-e%22,%22CONTRAST_USERNAME%22,%20%22-e%22,%22CONTRAST_ORG_ID%22,%20%20%22-i%22,%20%22--rm%22,%20%22contrast/mcp-contrast:latest%22,%20%22-t%22,%20%22stdio%22%5D,%22env%22:%7B%22CONTRAST_HOST_NAME%22:%22example.contrastsecurity.com%22,%22CONTRAST_API_KEY%22:%22example%22,%22CONTRAST_SERVICE_KEY%22:%22example%22,%22CONTRAST_USERNAME%22:%22example@example.com%22,%22CONTRAST_ORG_ID%22:%22example%22%7D%7D) <<<
125125
Allow the extension to be installed in your VSCode instance.
126126
Select Install Server
@@ -130,8 +130,6 @@ Select Install Server
130130
This will install the MCP Server. You will need to configure the server with your Contrast API credentials.
131131
![install2.png](images/install2.png)
132132

133-
134-
135133
#### Manual Install of MCP Server
136134
In VSCode go to settings and search for "mcp"
137135
![vscode-config.png](images%2Fvscode-config.png)
@@ -179,6 +177,49 @@ Once complete you should see the Contrast MCP Tools in the Tools drop down and y
179177
![vscode-config3.png](images%2Fvscode-config3.png)
180178

181179

180+
#### Install in Intellij
181+
To install the MCP Server in Copilot for Intellij.
182+
1. Select the Agent Mode in Copilot
183+
2. Click on the Tools drop down
184+
3. Select add more tools
185+
4. Add the below configuration to the mcp.json file
186+
5. Add your credentials to the env section.
187+
```json
188+
{
189+
"servers": {
190+
"contrastmcp": {
191+
"command": "docker",
192+
"args": [
193+
"run",
194+
"-e",
195+
"CONTRAST_HOST_NAME",
196+
"-e",
197+
"CONTRAST_API_KEY",
198+
"-e",
199+
"CONTRAST_SERVICE_KEY",
200+
"-e",
201+
"CONTRAST_USERNAME",
202+
"-e",
203+
"CONTRAST_ORG_ID",
204+
"-i",
205+
"--rm",
206+
"contrast/mcp-contrast:latest",
207+
"-t",
208+
"stdio"
209+
],
210+
"env": {
211+
"CONTRAST_HOST_NAME": "example.contrastsecurity.com",
212+
"CONTRAST_API_KEY": "example",
213+
"CONTRAST_SERVICE_KEY": "example",
214+
"CONTRAST_USERNAME": "example@example.com",
215+
"CONTRAST_ORG_ID": "example"
216+
}
217+
}
218+
}
219+
}
220+
```
221+
![intellij.gif](images/intellij.gif)
222+
182223
### Using Cline Plugin
183224
With the Cline plugin installed, select the MCP button in the top right corner of the screen.
184225
![cline1.png](images/cline1.png)

images/intellij.gif

2.61 MB
Loading

0 commit comments

Comments
 (0)