Update trivy test case

Signed-off-by: Yang Jiao <jiaoya@vmware.com>
This commit is contained in:
Yang Jiao 2022-03-09 10:14:39 +00:00
parent 7d9a1172ab
commit d1cf06a5aa
3 changed files with 15 additions and 16 deletions

View File

@ -116,13 +116,14 @@ Body Of View Scan Results
Body Of Scan Image On Push Body Of Scan Image On Push
[Arguments] @{vulnerability_levels} [Arguments] @{vulnerability_levels}
Init Chrome Driver Init Chrome Driver
${d}= get current date result_format=%m%s
Sign In Harbor ${HARBOR_URL} ${HARBOR_ADMIN} ${HARBOR_PASSWORD} Sign In Harbor ${HARBOR_URL} ${HARBOR_ADMIN} ${HARBOR_PASSWORD}
Go Into Project library Create An New Project And Go Into Project project${d}
Goto Project Config Goto Project Config
Enable Scan On Push Enable Scan On Push
Push Image ${ip} ${HARBOR_ADMIN} ${HARBOR_PASSWORD} library memcached Push Image ${ip} ${HARBOR_ADMIN} ${HARBOR_PASSWORD} project${d} memcached
Navigate To Projects Navigate To Projects
Go Into Project library Go Into Project project${d}
Go Into Repo memcached Go Into Repo memcached
Scan Result Should Display In List Row latest Scan Result Should Display In List Row latest
View Repo Scan Details @{vulnerability_levels} View Repo Scan Details @{vulnerability_levels}
@ -260,9 +261,7 @@ Body Of Verfiy System Level CVE Allowlist
Init Chrome Driver Init Chrome Driver
${d}= Get Current Date result_format=%m%s ${d}= Get Current Date result_format=%m%s
${image}= Set Variable ${image_argument} ${image}= Set Variable ${image_argument}
# ${image}= Set Variable goharbor/harbor-portal
${sha256}= Set Variable ${sha256_argument} ${sha256}= Set Variable ${sha256_argument}
# ${sha256}= Set Variable 2cb6a1c24dd6b88f11fd44ccc6560cb7be969f8ac5f752802c99cae6bcd592bb
${signin_user}= Set Variable user025 ${signin_user}= Set Variable user025
${signin_pwd}= Set Variable Test1@34 ${signin_pwd}= Set Variable Test1@34
Sign In Harbor ${HARBOR_URL} ${signin_user} ${signin_pwd} Sign In Harbor ${HARBOR_URL} ${signin_user} ${signin_pwd}
@ -280,13 +279,13 @@ Body Of Verfiy System Level CVE Allowlist
Check Listed In CVE Allowlist project${d} ${image} ${sha256} ${single_cve} is_in=No Check Listed In CVE Allowlist project${d} ${image} ${sha256} ${single_cve} is_in=No
Switch To Configure Switch To Configure
Switch To Configuration System Setting Switch To Configuration System Setting
# Add Items To System CVE Allowlist CVE-2019-19317\nCVE-2019-19646 \nCVE-2019-5188 \nCVE-2019-20387 \nCVE-2019-17498 \nCVE-2019-20372 \nCVE-2019-19244 \nCVE-2019-19603 \nCVE-2019-19880 \nCVE-2019-19923 \nCVE-2019-19925 \nCVE-2019-19926 \nCVE-2019-19959 \nCVE-2019-20218 \nCVE-2019-19232 \nCVE-2019-19234 \nCVE-2019-19645 # Add Items To System CVE Allowlist CVE-2021-36222\nCVE-2021-43527 \nCVE-2021-4044 \nCVE-2021-36084 \nCVE-2021-36085 \nCVE-2021-36086 \nCVE-2021-37750 \nCVE-2021-40528
Add Items To System CVE Allowlist ${most_cve_list} Add Items To System CVE Allowlist ${most_cve_list}
Cannot Pull Image ${ip} ${signin_user} ${signin_pwd} project${d} ${image} tag=${sha256} err_msg=cannot be pulled due to configured policy Cannot Pull Image ${ip} ${signin_user} ${signin_pwd} project${d} ${image} tag=${sha256} err_msg=cannot be pulled due to configured policy
# Add Items To System CVE Allowlist CVE-2019-18276 # Add Items To System CVE Allowlist CVE-2021-43519
Add Items To System CVE Allowlist ${single_cve} Add Items To System CVE Allowlist ${single_cve}
Pull Image ${ip} ${signin_user} ${signin_pwd} project${d} ${image} tag=${sha256} Pull Image ${ip} ${signin_user} ${signin_pwd} project${d} ${image} tag=${sha256}
Delete Top Item In System CVE Allowlist count=16 Delete Top Item In System CVE Allowlist count=9
Cannot Pull Image ${ip} ${signin_user} ${signin_pwd} project${d} ${image} tag=${sha256} err_msg=cannot be pulled due to configured policy Cannot Pull Image ${ip} ${signin_user} ${signin_pwd} project${d} ${image} tag=${sha256} err_msg=cannot be pulled due to configured policy
Check Listed In CVE Allowlist project${d} ${image} ${sha256} ${single_cve} Check Listed In CVE Allowlist project${d} ${image} ${sha256} ${single_cve}

View File

@ -143,7 +143,7 @@ Test Case - Scan Schedule Job
Go Into Project ${project_name} Go Into Project ${project_name}
Go Into Repo ${project_name}/${image} Go Into Repo ${project_name}/${image}
Scan Result Should Display In List Row ${sha256} Scan Result Should Display In List Row ${sha256}
View Repo Scan Details High Medium View Repo Scan Details Critical High
Test Case - Replication Schedule Job Test Case - Replication Schedule Job
[tags] Replication_schedule [tags] Replication_schedule

View File

@ -61,10 +61,10 @@ Test Case - Scan As An Unprivileged User
# Chose a empty Vul repo # Chose a empty Vul repo
Test Case - Scan Image With Empty Vul Test Case - Scan Image With Empty Vul
Body Of Scan Image With Empty Vul photon 2.0_scan Body Of Scan Image With Empty Vul photon 4.0_scan
Test Case - Manual Scan All Test Case - Manual Scan All
Body Of Manual Scan All High Medium Body Of Manual Scan All Critical High
#Test Case - View Scan Error #Test Case - View Scan Error
# Init Chrome Driver # Init Chrome Driver
@ -81,11 +81,11 @@ Test Case - Manual Scan All
Test Case - Scan Image On Push Test Case - Scan Image On Push
[Tags] run-once [Tags] run-once
Body Of Scan Image On Push High Medium Body Of Scan Image On Push Critical High
Test Case - View Scan Results Test Case - View Scan Results
[Tags] run-once [Tags] run-once
Body Of View Scan Results High Body Of View Scan Results Critical
Test Case - Project Level Image Serverity Policy Test Case - Project Level Image Serverity Policy
[Tags] run-once [Tags] run-once
@ -111,13 +111,13 @@ Test Case - Project Level Image Serverity Policy
#Important Note: All CVE IDs in CVE Allowlist cases must unique! #Important Note: All CVE IDs in CVE Allowlist cases must unique!
Test Case - Verfiy System Level CVE Allowlist Test Case - Verfiy System Level CVE Allowlist
[Tags] sys_cve [Tags] sys_cve
Body Of Verfiy System Level CVE Allowlist goharbor/harbor-portal 2cb6a1c24dd6b88f11fd44ccc6560cb7be969f8ac5f752802c99cae6bcd592bb CVE-2019-19317\nCVE-2019-19646 \nCVE-2019-5188 \nCVE-2019-20387 \nCVE-2019-17498 \nCVE-2019-20372 \nCVE-2019-19244 \nCVE-2019-19603 \nCVE-2019-19880 \nCVE-2019-19923 \nCVE-2019-19925 \nCVE-2019-19926 \nCVE-2019-19959 \nCVE-2019-20218 \nCVE-2019-19232 \nCVE-2019-19234 \nCVE-2019-19645 CVE-2019-18276 Body Of Verfiy System Level CVE Allowlist goharbor/harbor-portal 55d776fc7f431cdd008c3d8fc3e090c81c1368ed9ed85335f4664df71f864f0d CVE-2021-36222\nCVE-2021-43527 \nCVE-2021-4044 \nCVE-2021-36084 \nCVE-2021-36085 \nCVE-2021-36086 \nCVE-2021-37750 \nCVE-2021-40528 CVE-2021-43519
Test Case - Verfiy Project Level CVE Allowlist Test Case - Verfiy Project Level CVE Allowlist
Body Of Verfiy Project Level CVE Allowlist goharbor/harbor-portal 2cb6a1c24dd6b88f11fd44ccc6560cb7be969f8ac5f752802c99cae6bcd592bb CVE-2019-19317\nCVE-2019-19646 \nCVE-2019-5188 \nCVE-2019-20387 \nCVE-2019-17498 \nCVE-2019-20372 \nCVE-2019-19244 \nCVE-2019-19603 \nCVE-2019-19880 \nCVE-2019-19923 \nCVE-2019-19925 \nCVE-2019-19926 \nCVE-2019-19959 \nCVE-2019-20218 \nCVE-2019-19232 \nCVE-2019-19234 \nCVE-2019-19645 CVE-2019-18276 Body Of Verfiy Project Level CVE Allowlist goharbor/harbor-portal 55d776fc7f431cdd008c3d8fc3e090c81c1368ed9ed85335f4664df71f864f0d CVE-2021-36222\nCVE-2021-43527 \nCVE-2021-4044 \nCVE-2021-36084 \nCVE-2021-36085 \nCVE-2021-36086 \nCVE-2021-37750 \nCVE-2021-40528 CVE-2021-43519
Test Case - Verfiy Project Level CVE Allowlist By Quick Way of Add System Test Case - Verfiy Project Level CVE Allowlist By Quick Way of Add System
Body Of Verfiy Project Level CVE Allowlist By Quick Way of Add System goharbor/harbor-portal 2cb6a1c24dd6b88f11fd44ccc6560cb7be969f8ac5f752802c99cae6bcd592bb CVE-2019-19317\nCVE-2019-19646 \nCVE-2019-5188 \nCVE-2019-20387 \nCVE-2019-17498 \nCVE-2019-20372 \nCVE-2019-19244 \nCVE-2019-19603 \nCVE-2019-19880 \nCVE-2019-19923 \nCVE-2019-19925 \nCVE-2019-19926 \nCVE-2019-19959 \nCVE-2019-20218 \nCVE-2019-19232 \nCVE-2019-19234 \nCVE-2019-19645 \nCVE-2019-18276 Body Of Verfiy Project Level CVE Allowlist By Quick Way of Add System goharbor/harbor-portal 55d776fc7f431cdd008c3d8fc3e090c81c1368ed9ed85335f4664df71f864f0d CVE-2021-36222\nCVE-2021-43527 \nCVE-2021-4044 \nCVE-2021-36084 \nCVE-2021-36085 \nCVE-2021-36086 \nCVE-2021-37750 \nCVE-2021-40528 \nCVE-2021-43519
Test Case - Stop Scan And Stop Scan All Test Case - Stop Scan And Stop Scan All
[Tags] stop_scan_job [Tags] stop_scan_job