Skip to content

Commit becde9e

Browse files
committed
[2416797] Updated documentation and removed all occurrences of branch from the code base
1 parent a97deee commit becde9e

14 files changed

+7
-92
lines changed

README.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -96,10 +96,10 @@ components of RESC.
9696

9797
### VCS Scanner Worker flow diagram
9898
The flow diagram below shows the different stages that a VCS Scanner Worker goes through and the choices it is confronted with to
99-
come to the desired result. It first picks up a branch from the queue where it is decided, in conjunction with user input, what type of scan to run.
100-
If it is a base scan, a full scan of all commits will be carried out to look for secrets. Possible findings are stored inside the database along with the last scanned commit hash of the branch. An incremental scan, where the branch was scanned earlier, only looks at the commits that were made after the last scanned commit hash. The process of finding secrets and storing them in the database is similar as previously described.
99+
come to the desired result. It first picks up a repository from the queue where it is decided, in conjunction with user input, what type of scan to run.
100+
If it is a base scan, a full scan of all commits will be carried out to look for secrets. Possible findings are stored inside the database along with the last scanned commit hash of the repository. An incremental scan, where the repository was scanned earlier, only looks at the commits that were made after the last scanned commit hash. The process of finding secrets and storing them in the database is similar as previously described.
101101

102-
![product-screenshot!](images/RESC_Scan_Flow_Diagram.png)
102+
![product-screenshot!](images/RESC_Scan_Flow_Diagram.svg)
103103

104104
### RESC high-level overview
105105
The diagram below gives a high-level overview of the Repository Scanner tool. All the different components of the

components/resc-backend/tests/newman_tests/RESC_web_service.postman_collection.json

-1
Original file line numberDiff line numberDiff line change
@@ -10313,7 +10313,6 @@
1031310313
" pm.expect(responseJson[\"data\"][0][\"email\"]).to.eql(\"test-author@mail.com\");",
1031410314
" pm.expect(responseJson[\"data\"][0][\"event_sent_on\"]).to.eql(null);",
1031510315
" pm.expect(responseJson[\"data\"][0][\"rule_name\"]).to.eql(\"Rule-1\");",
10316-
" pm.expect(responseJson[\"data\"][0][\"branch_id\"]).to.eql(pm.environment.get(\"branch_id\"));",
1031710316
" pm.expect(responseJson[\"data\"][0][\"id_\"]).to.be.greaterThan(0);",
1031810317
" pm.expect(responseJson[\"data\"][0][\"scan_ids\"]).to.eql(null);",
1031910318
"});",

components/resc-frontend/src/components/Filters/RuleAnalysisFilter.vue

-3
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,6 @@ export default {
146146
selectedStatus: null,
147147
selectedProject: null,
148148
selectedRepository: null,
149-
selectedBranch: null,
150149
selectedRule: null,
151150
selectedRuleTags: null,
152151
selectedRulePackVersions: [],
@@ -242,7 +241,6 @@ export default {
242241
filterObj.status = this.selectedStatus;
243242
filterObj.project = this.selectedProject;
244243
filterObj.repository = this.selectedRepository;
245-
filterObj.branch = this.selectedBranch;
246244
filterObj.rule = this.selectedRule;
247245
filterObj.rulePackVersions = rulePackVersions;
248246
filterObj.ruleTags = this.selectedRuleTags;
@@ -315,7 +313,6 @@ export default {
315313
filterObj.status = this.selectedStatus;
316314
filterObj.project = this.selectedProject;
317315
filterObj.repository = this.selectedRepository;
318-
filterObj.branch = this.selectedBranch;
319316
filterObj.rule = selectedRules;
320317
filterObj.ruleTags = this.selectedRuleTags;
321318
filterObj.rulePackVersions = selectedVersions;

components/resc-frontend/src/components/Filters/ScanFindingsFilter.vue

-1
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,6 @@ export default {
8888
data() {
8989
return {
9090
previousScans: [],
91-
branchList: [],
9291
scanList: [],
9392
scanDateList: [],
9493
ruleList: [],

components/resc-frontend/src/services/branch-service.js

-11
This file was deleted.

components/resc-frontend/src/services/findings-service.js

-3
Original file line numberDiff line numberDiff line change
@@ -42,9 +42,6 @@ const FindingsService = {
4242
if (filter.repository) {
4343
query_string += `&repository_name=${filter.repository}`;
4444
}
45-
if (filter.branch) {
46-
query_string += `&branch_name=${filter.branch}`;
47-
}
4845
if (filter.startDate) {
4946
query_string += `&start_date_time=${filter.startDate}T00:00:00`;
5047
}

components/resc-frontend/tests/resources/mock_detailed_findings.json

-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@
1919
"repository_url": "https://bitbucket.com:7999/scm/ABC/test.git",
2020
"timestamp": "2022-03-09T16:37:22.820000",
2121
"vcs_provider": "BITBUCKET",
22-
"branch_name": "feature1",
2322
"last_scanned_commit": "138846cfcfc3caea3568d4af6dbabbadb3373039",
2423
"scan_id": 5,
2524
"id_": 1

components/resc-frontend/tests/resources/mock_detailed_findings_with_rule_pack_version.json

-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@
1919
"repository_url": "https://bitbucket.com:7999/scm/ABC/test.git",
2020
"timestamp": "2022-03-09T16:37:22.820000",
2121
"vcs_provider": "BITBUCKET",
22-
"branch_name": "feature1",
2322
"last_scanned_commit": "138846cfcfc3caea3568d4af6dbabbadb3373039",
2423
"scan_id": 5,
2524
"id_": 1

components/resc-frontend/tests/unit/services/branch-service.spec.js

-61
This file was deleted.

components/resc-frontend/tests/unit/services/findings-service.spec.js

-2
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,6 @@ describe('function getDetailedFindings', () => {
5151
filterObj.findingStatus = `${Config.value('notAnalyzedStatusVal')}`;
5252
filterObj.project = 'ABC';
5353
filterObj.repository = 'test';
54-
filterObj.branch = 'feature1';
5554
filterObj.rule = 'Hardcoded-Username';
5655

5756
const response = await FindingsService.getDetailedFindings(filterObj);
@@ -79,7 +78,6 @@ describe('function getDetailedFindings', () => {
7978
filterObj.findingStatus = `${Config.value('notAnalyzedStatusVal')}`;
8079
filterObj.project = 'ABC';
8180
filterObj.repository = 'test';
82-
filterObj.branch = 'feature1';
8381
filterObj.rule = 'Hardcoded-Username';
8482
filterObj.rulePackVersions = '0.0.0';
8583

components/resc-vcs-scraper/tests/vcs_scraper/vcs_connectors/test_bitbucket_connector.py

+1-2
Original file line numberDiff line numberDiff line change
@@ -38,8 +38,7 @@ def test_export_repository_all_branches():
3838

3939
vcs_instance_name = "test server"
4040

41-
with mock.patch.dict(os.environ, {"SCAN_ONLY_MASTER_BRANCH": "false"}):
42-
result = BitbucketConnector.export_repository(repository_information, latest_commit, vcs_instance_name)
41+
result = BitbucketConnector.export_repository(repository_information, latest_commit, vcs_instance_name)
4342

4443
assert type(result) is Repository
4544
assert result.repository_name == "repo1"

components/resc-vcs-scraper/tests/vcs_scraper/vcs_connectors/test_github_public_connector.py

+1-2
Original file line numberDiff line numberDiff line change
@@ -53,8 +53,7 @@ def test_export_repository_all_branches():
5353
latest_commit = "abc123"
5454

5555
vcs_instance_name = "test server"
56-
with mock.patch.dict(os.environ, {"SCAN_ONLY_MASTER_BRANCH": "false"}):
57-
result = GithubPublicConnector.export_repository(repository_information, latest_commit, vcs_instance_name)
56+
result = GithubPublicConnector.export_repository(repository_information, latest_commit, vcs_instance_name)
5857

5958
assert type(result) is Repository
6059
assert result.project_key == "project1"

images/RESC_Scan_Flow_Diagram.drawio

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
<mxfile host="" modified="2023-07-04T14:50:04.618Z" agent="Mozilla/5.0 (Macintosh; Intel Mac OS X 10_16_0) AppleWebKit/537.36 (KHTML, like Gecko) draw.io/11.1.4 Chrome/76.0.3809.88 Electron/6.0.0 Safari/537.36" etag="i6l_zoEsIjOpg4lnpFkJ" version="11.1.4" type="device"><diagram name="Page-1" id="-QA6rKH03Z_Wp-m-v66E">7VxZc9o6FP41PKbj3eYxENLbTtrphEyX+9IxtgA3xqK2SEh//ZXwqsVgjExNbvJA8LEkpLN8Z7HkgT5ebd/H7nr5CfogHGiKvx3oNwNNUxXVwf8I5SWlWMYwJSziwM8alYRp8AfkPTPqJvBBQjVEEIYoWNNED0YR8BBFc+MYPtPN5jCkf3XtLgBHmHpuyFO/BT5aplRHs0v6PyBYLPNfVq1sfSs3b5ytJFm6PnyukPTJQB/HEKL022o7BiFhXs6XtN9tzd1iYjGIUJMOi/un39Yv4OjXd1eB+unhp/vw4UpLR3lyw0224ClyY5TNGL3kbIjhJvIBGUkd6KPnZYDAdO165O4zFjymLdEqzG7PgzAcwxDGu766bwLHNzA9QTF8BJU7jjbTLQvf4deSLe8JxAhsK6Rsbe8BXAEUv+AmW1phMj1T8xGeS6mpuSiWFYk5Gc3NFGVRjFzyEn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