Customized Scan Scope for Large Size Jira/Confluence/Asana Sites #31
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR implements a solution for the following issues:
JiraError HTTP 400
#20Summary
The solution is based on mapping the target site using the new flag
--map
. It will generate a JSON file with a list of all tickets/pages/issues from the site organized hierarchically. Then you can customize the mapping file to run scans with a narrower coverage.Usage
In order to run a scan with a customized coverage, 2 steps are required:
Generating the map file
You can generate a full map file or a map with only the highest namespace (i.e projects for Jira, workspaces for Confluence and Asana)
Full Mapping
n0s1 jira_scan --map --map-file jira_map.json
Will generate the following "jira_map.json" file:
Quick Mapping
Alternatively you can create a mapping with only the highest namespace by using the
--map 1
flag:n0s1 jira_scan --map 1
It will generate the following "n0s1_map.json" file:
Scoped Scans
You can customize the scan coverage by manually editing the map file, or splitting the mapping in equal parts by using the
--scope c/n
flag (where "c" is the chunk number you want to scan, and "n" the total number of chunks you are splitting the map).Manual Scope Customization
You can edit the map file and remove tickets or entire projects to perform a faster scan. You can customize the scan coverage by editing the map file (e.g. saving it to "smaller_jira_map.json") and running a new scan with the
--map-file
flag:n0s1 jira_scan --map-file smaller_jira_map.json
Using the following "smaller_jira_map.json" as an example:
The tickets to be scanned are:
Everything else will be ignored..
Auto Scope Customization
Another alternative is to split the scan in several chunks with the same size by using the new flag
--scope
. For instance, if you provide the original mapping file "jira_map.json" and set the flag--scope 2/5
, it will split the mapping in 5 equal parts, and scan the 2nd chunk.It allows you to scan a massive database by diving the scan in "n" steps:
n0s1 jira_scan --map --map-file jira_map.json
n0s1 jira_scan --scope 1/4 --map-file jira_map.json --report-file report_1_4.json
n0s1 jira_scan --scope 2/4 --map-file jira_map.json --report-file report_2_4.json
n0s1 jira_scan --scope 3/4 --map-file jira_map.json --report-file report_3_4.json
n0s1 jira_scan --scope 4/4 --map-file jira_map.json --report-file report_4_4.json