If your client is successfully subscribed to this event, you should see similar output in your terminal:
Subscribed to the following events: [ 'project-created' ]
Your client is now working and you will see new events output to the terminal as they are pushed from AttackForge.
You can now work on your integration code to start actioning these events. Open index.js with a text editor from your client directory. Your code will replace the following section within this file:
/* ENTER YOUR INTEGRATION CODE HERE */
/* method contains the event type e.g. vulnerability-created */
/* params contains the event body e.g. JSON object with timestamp & vulnerability details */
Python
Python Prerequisites
In order to subscribe to this event using the Python client, you must have:
Python3 installed
PIP installed
A working Python client (see Setting Up Your Client for details).
Client configuration
Open a terminal and navigate to the client directory.
From the client directory, run following command, substituting variables below with your configuration details:
If your client is successfully subscribed to the events, you should see similar output in your terminal:
Subscribed to the following events: [ 'project-created' ]
Your client is now working and you will see new events output to the terminal as they are pushed from AttackForge.
You can now work on your integration code to start actioning these events. Open main.py with a text editor from your client directory. Your code will replace the following section within this file:
# ENTER YOUR INTEGRATION CODE HERE
# method contains the event type e.g. vulnerability-created
# params contains the event body e.g. JSON object with timestamp & vulnerability details
.NET
.NET Prerequisites
In order to subscribe to this event using the .NET client, you must have:
.NET 5.0 SDK installed
A working .NET client (see Setting Up Your Client for details).
Client configuration
Open a terminal and navigate to the client directory.
From the client directory, run following command, substituting variables below with your configuration details:
$ HOSTNAME="YOUR-AFE-HOSTNAME" EVENTS="project-created" X_SSAPI_KEY="YOUR-API-KEY" dotnet run
An example is included below for reference:
$ HOSTNAME="demo.attackforge.com" EVENTS="project-created" X_SSAPI_KEY="q9ef672kqZIQymCZRuiKMeWbeaXEzBzqRCfGcpWEpoBNU2Bk4UmtktsZVDDgRzlC0BOHH9x0y4EzbBGeSKO9PRskEmHATXHs2sVe7tS98U0DuDFjH0RdPFWUpgZDWgIESy9yNDesm6Xi8C9HsikddyBKsATXat2604dPrr4Ca86J8Y5IkEnqUwYzw3MoSbzHeXZ0DKHqKz6Icv9dtrsnAFzpXg1P423uRllq4LqFjP4J8hAtrWZ9296h3uh9B5Vp" dotnet run
If your client is successfully subscribed to the events, you should see similar output in your terminal:
Subscribed to the following events: [ 'project-created' ]
Your client is now working and you will see new events output to the terminal as they are pushed from AttackForge.
You can now work on your integration code to start actioning these events. Open Program.cs with a text editor from your client directory. Your code will replace the following section within this file:
/* ENTER YOUR INTEGRATION CODE HERE */
/* method contains the event type e.g. vulnerability-created */
/* params contains the event body e.g. JSON object with timestamp & vulnerability details */
Java
Java Prerequisites
In order to subscribe to this event using the Java client, you must have:
OpenJDK 11 installed
Maven installed
A working Java client (see Setting Up Your Client for details).
Client configuration
Open a terminal and navigate to the client directory.
From the client directory, run following command, substituting variables below with your configuration details:
If your client is successfully subscribed to the events, you should see similar output in your terminal:
Subscribed to the following events: [ 'project-created' ]
Your client is now working and you will see new events output to the terminal as they are pushed from AttackForge.
You can now work on your integration code to start actioning these events. Open ./src/main/java/com/attackforge/App.java with a text editor from your client directory. Your code will replace the following section within this file:
/* ENTER YOUR INTEGRATION CODE HERE */
/* method contains the event type e.g. vulnerability-created */
/* params contains the event body e.g. JSON object with timestamp & vulnerability details */
Go
Go Prerequisites
In order to subscribe to this event using the Go client, you must have:
Go installed
A working Go client (see Setting Up Your Client for details).
Client configuration
Open a terminal and navigate to the client directory.
From the client directory, run following command, substituting variables below with your configuration details:
If your client is successfully subscribed to this event, you should see similar output in your terminal:
Subscribed to the following events: [ 'project-created' ]
Your client is now working and you will see new events output to the terminal as they are pushed from AttackForge.
You can now work on your integration code to start actioning these events. Open main.go with a text editor from your client directory. Your code will replace the following section within this file:
/* ENTER YOUR INTEGRATION CODE HERE */
/* method contains the event type e.g. vulnerability-created */
/* params contains the event body e.g. JSON object with timestamp & vulnerability details */
Example Response
The event emitted will include the following information: