The appscan-issue-gateway-v2
facilitates synchronization of issues between AppScan (ASoC, A360° & ASE) and Jira. This capability allows AppScan users to push security issue data into other systems, eliminating the need for custom REST calls and plumbing. This service operates as a REST API, making it ideal for automated scanning workflows where it is invoked for issue processing.
- Node.js runtime version >= 18.18.0
- Relevant AppScan product:
- HCL AppScan Enterprise >= v10.x
- AppScan on Cloud
- AppScan 360° >= v1.3
- A supported Issue Management system: Jira
-
Download/clone the code from the repository.
-
Open the command prompt from the home directory and run the command
npm install
to install all required npm libraries. -
Edit the
.env
file (rename.env.temp
to.env
) in the home directory to configure the following properties:APPSCAN_URL
: URL of the AppScan Enterprise, ASoC, or A360°keyId
: AppScan key idkeySecret
: AppScan key secretAPPSCAN_PROVIDER
: ASoC or A360 or ASEAPPSCAN_TIMEZONE
: Add your local time zone i.e. by default keep it 00:00SECURE_PORT
: Port the Gateway application listens toSSL_PFX_CERT_FILE
: Path to the certificate in PFX formatSSL_PFX_CERT_PASSPHRASE
: Certificate passphrase/passwordNODE_TLS_REJECT_UNAUTHORIZED
: Set it 1 if you have valid certificates for ASE/A360°. (refer notes #4)LOCAL_ADMIN_USER
: Set the only user who can log in to IGWADMIN_USER_PASSWORD
: The hashed password of the IGW user. To hash the password, run the commandnode [
cryptoService.js](cryptoService.js ) --hash <password>
from the base directoryAPP_LOG
: Path and name of the log fileMAXLOGSIZE
: Maximum size of the log fileNUMBER_OF_BACKUPS
: Number of backupsIM_PROVIDER
: Provider Name (e.g., JIRA)GENERATE_HTML_FILE_JIRA
: Set this to 'true' to attach reports in JiraGENERATE_SCAN_HTML_FILE_JIRA
: set this to 'true' to create a separate ticket for scans.IMPORT_ISSUES_TO_IM_SYNC_INTERVAL
: Start the sync thread to push data from AppScan to the Issue Management System.1
means the synchronizer runs every day to push issues identified the previous day.2
means the synchronizer runs once every 2 days to push issues identified in the last 2 days.IM_TO_APPSCAN_STATUS_SYNC_INTERVAL
: Bidirectional feature to update the issue status in AppScan From Jira. The sync interval can be in minutes, hours, or days (e.g.,1d
for daily,10m
for every 10 minutes,1h
for hourly).APPSCAN_TO_IM_STATUS_SYNC_INTERVAL
: Feature to update issue status in Jira from AppScan. The sync interval can be in minutes, hours, or days (e.g.,1d
for daily,10m
for every 10 minutes,1h
for hourly). (refer notes #1)
-
Rename
config/JIRA.json.temp
toconfig/JIRA.json
and configure the following properties:maxissues
: The maximum number of issues to process in this jobimSummary
: Specify the summary of the jira ticket. You can also include AppScan's issue response attribute e.g. "Security issue found in %ApplicationName%",". Here %ApplicationName% will be picked dynamically.issuestates
: Specific issue states to focus onissueseverities
: Specific issue severities to focus onimurl
: URL of your Jira instanceimUserName
: Jira username for running the jobimPassword
: Password for the corresponding Jira userimissuetype
: Jira issue type (e.g., task, bug, epic)severityPriorityMap
: Map AppScan severity to Jira ticket priority. (refer notes #2)
-
attributeMappings
: Use this maping to create Jira tickets with attributes mapped from AppScan attribute.-
"imAttrId": "<This is an attribute id from the IM>", "imAttrName:"<The name of the attribute from the IM>" "defaultAttrValue": "<If you want to have a hardcoded value for an IM attribute then you use this field>", "appScanAttr": "<This is an attribute name from AppScan>", "type": "<Type of Jira attribute. Currently we support following types: String, Array, Dropdown, DateTime>"}
-
-
jiraToAppScanStatusMapping
: Use this mapping to update issue status in AppScan when an issue in Jira changes to a specific status. For example:"Closed":"Fixed"
: This will update the issue status in AppScan toFixed
when the corresponding ticket in Jira changes toClosed
.
-
appScanToJiraStatusMapping
: Use this mapping to update issue status in Jira when an issue in AppScan changes to a specific status. For example:"Noise":"False Positive"
: This will update the issue status in Jira toFalse Positive
when the corresponding ticket in AppScan changes toNoise
. (refer notes #3)
-
jiraStatusIdMapping
: Map Jira status names to their corresponding status IDs.
- Rename
config/projectKey.json.temp
toconfig/projectKey.json
and map the AppScan application ID to the Jira Project Key as required. - Rename
config/projectScanKey.json.temp
toconfig/projectScanKey.json
and map the AppScan application ID to the Jira Project Key as required. - To start the Gateway application locally, run the command
npm start
from the root directory. To install it as a service, refer to the next step. - To install/uninstall the application as a Windows Service, run the following commands from the root directory:
node [
service.js](service.js ) --install
node [
service.js](service.js ) --uninstall
- Access the API's Swagger page using the URL
https://<hostname>:<port>/api/swagger
. This URL can be found in the console/log. - Use the API to provide Issue Management details and start the synchronizer, or edit the file in the config directory.
- If installing the service fails following step 8, follow these steps:
- Download the NSSM utility from NSSM
- Launch
nssm.exe
from thewin64
folder by running the commandnssm.exe install "HCL Issue Gateway"
AppScan Issue Gateway has following limitations:
- Bi-directional functionality is currently not available in case of personal scans.
- Syncing issues imported via external scanners in ASE is currently not supported.
- Issues will always be created in default state (Open) and then transit to target state based on
appScanToJiraStatusMapping
in the nextAPPSCAN_TO_IM_STATUS_SYNC_INTERVAL
job run. e.g. If a issue during the import wasNoise
in AppScan then the issue will be created in Jira asOpen
and then based on the mapping configured inappScanToJiraStatusMapping
the issue status will transit to target state in the next job run. - If in the Jira.Json file for the key
severityPriorityMap
, no mapping is present then the priority of the ticket created will beMedium
by default. - A cyclic dependency means that a status in AppScan maps to a status in Jira,
and that status in Jira maps back to the original status in AppScan, or vice versa. In
appScanToJiraStatusMapping
&jiraToAppScanStatusMapping
, you can configure the status to sync betwen AppScan and Jira. However you can not specify the same status in both the mappings and it will throw validation error. - If you get errors related to certificates then please verify if you have valid certificates.
All files in this project are licensed under the Apache License 2.0.