Skip to content

Integrations

AI Integration

If you want to integrate with AI services, you might need to provide the AI service endpoint and authentication details. The AiConfiguration section in the appsettings.json file is used to configure the integration with AI services. Here's a breakdown of each field:

"AIConfiguration": {
"Enabled": true,
"Type": "OpenAI",
"Model": "gpt-4",
"ApiKey": "sk-xxxx....",
"Endpoint": "https://api.contoso.com/v1/chat/completions",
"MaxTokens": 4096
},
  • Enabled: This is a boolean value that determines whether the AI integration is enabled or not. Set it to true to enable the integration, or false to disable it.
  • Type: This is the type of AI service that will be used. In this case, the valid values are OpenAI, Azure or Custom.
  • Model: This is the name of the model that will be used. In this case, it's set to gpt-4. For more information about the available models, please refer to the OpenAI API documentation. Or Azure documentation Azure API documentation.
  • ApiKey: This is the API key that will be used to authenticate with the AI service.
  • Endpoint: This is the endpoint of the AI service that will be used only applicable for Azure.
  • MaxTokens: This is the maximum number of tokens that will be generated by the AI service. In this case, it's set to 4096.

For the Custom type, the Endpoint field is used to specify the endpoint of the custom AI service and is required. The ApiKey (optional) field is used to specify the API key that will be used to authenticate with the custom AI service.

"AIConfiguration": {
"Enabled": true,
"Type": "Custom",
"Model": "llama",
"ApiKey": "optional",
"Endpoint": "https://10.10.10.10/v1/chat/completions",
"MaxTokens": 4096
},

If you are using docker and a local LLM, you can use the host.docker.internal hostname to connect to the AI service running on the host machine. For example:

"AIConfiguration": {
"Enabled": true,
"Type": "Custom",
"Model": "llama",
"ApiKey": "optional",
"Endpoint": "http://host.docker.internal:1234/v1/chat/completions",
"MaxTokens": 4096
},

Jira Integration

If you want to integrate with Jira, you might need to provide the Jira base URL and authentication details. The JiraConfiguration section in the appsettings.json file is used to configure the integration with Jira. Here's a breakdown of each field:

{
   "JiraConfiguration": {
    "Enabled": true,
    "Auth": "Basic",
    "Url": "http://localhost:8080",
    "Project": "CER",
    "User": "admin",
    "Password": "admin",
    "ConsumerKey": "",
    "ConsumerSecret": "",
    "OAuthAccessToken": "",
    "OAuthTokenSecret": "",
    "TicketConfiguration": {
        "IssueType": "Tarea",
        "Risk": {
          "Critical": "Highest",
            "High": "High",
            "Medium": "Medium",
            "Low": "Low",
            "Info": "Lowest"
        },
        "Labels": [
          "Cervantes"
        ],
        "Components": [
          "Cervantes"
        ]
      }
  }
}
  • Enabled: This is a boolean value that determines whether the Jira integration is enabled or not. Set it to true to enable the integration, or false to disable it.

  • Auth: This field specifies the type of authentication used to connect to Jira. In this case, it's set to Basic, which means it uses basic authentication (username and password). This filed can be Basic or OAuth

  • Url: This is the URL of your Jira instance.

  • Project: This is the key of the Jira project where the issues will be created.

  • User: This is the username used for authentication.

  • Password: This is the password used for authentication.

  • ConsumerKey, ConsumerSecret, OAuthAccessToken, OAuthTokenSecret: These fields are used for OAuth authentication. In this case, they are not used as the Auth field is set to Basic.

  • TicketConfiguration: This section is used to configure how the tickets are created in Jira.

  • IssueType: This is the type of issue that will be created in Jira. In this case, it's set to Tarea.

  • Risk: This section maps the risk levels of the vulnerabilities to the priority levels in Jira.

  • Labels: This is an array of labels that will be added to the created issues in Jira.

  • Components: This is an array of components that will be added to the created issues in Jira.

Please replace the placeholders with your actual Jira details. Remember to keep your appsettings.json file secure as it contains sensitive information. Don't include it in your version control system. Instead, consider using environment variables or a key vault for storing sensitive data in production.

Email Integration

The EmailConfiguration section in the appsettings.json file is used to configure the email settings for the application. Here's a breakdown of each field:

"EmailConfiguration": {
    "Enabled": true,
    "Name": "Cervantes",
    "From": "cervantes@cervantes.local",
    "SmtpServer": "localhost",
    "SmtpPort": 1025,
    "SmtpUsername": "cervantes@cervantes.local",
    "SmtpPassword": "cervantes"
  },
  • Enabled: This is a boolean value that determines whether the email functionality is enabled or not. Set it to true to enable the functionality, or false to disable it.

  • Name: This is the name that will appear as the sender's name in the emails sent by the application.

  • From: This is the email address that will appear as the sender's email in the emails sent by the application.

  • SmtpServer: This is the hostname or IP address of the SMTP server that will be used to send emails.

  • SmtpPort: This is the port number on the SMTP server to which the application will connect to send emails.

  • SmtpUsername: This is the username that will be used to authenticate with the SMTP server.

  • SmtpPassword: This is the password that will be used to authenticate with the SMTP server.

Please replace the placeholders with your actual email details. Remember to keep your appsettings.json file secure as it contains sensitive information. Don't include it in your version control system. Instead, consider using environment variables or a key vault for storing sensitive data in production.