mirror of https://github.com/goharbor/harbor.git
Merge branch 'main' into 24apr17_auto_scan_sbom_error
This commit is contained in:
commit
b49fa948b8
|
@ -1176,11 +1176,11 @@ paths:
|
|||
- $ref: '#/parameters/projectName'
|
||||
- $ref: '#/parameters/repositoryName'
|
||||
- $ref: '#/parameters/reference'
|
||||
- name: scan_request_type
|
||||
- name: scanType
|
||||
in: body
|
||||
required: false
|
||||
schema:
|
||||
$ref: '#/definitions/ScanRequestType'
|
||||
$ref: '#/definitions/ScanType'
|
||||
responses:
|
||||
'202':
|
||||
$ref: '#/responses/202'
|
||||
|
@ -6766,13 +6766,6 @@ definitions:
|
|||
type: string
|
||||
description: Version of the scanner adapter
|
||||
example: "v0.9.1"
|
||||
ScanRequestType:
|
||||
type: object
|
||||
properties:
|
||||
scan_type:
|
||||
type: string
|
||||
description: 'The scan type for the scan request. Two options are currently supported, vulnerability and sbom'
|
||||
enum: [vulnerability, sbom]
|
||||
ScanOverview:
|
||||
type: object
|
||||
description: 'The scan overview attached in the metadata of tag'
|
||||
|
|
|
@ -745,10 +745,11 @@ func (bc *basicController) GetSBOMSummary(ctx context.Context, art *ar.Artifact,
|
|||
return map[string]interface{}{}, nil
|
||||
}
|
||||
reportContent := reports[0].Report
|
||||
result := map[string]interface{}{}
|
||||
if len(reportContent) == 0 {
|
||||
log.Warning("no content for current report")
|
||||
return result, nil
|
||||
}
|
||||
result := map[string]interface{}{}
|
||||
err = json.Unmarshal([]byte(reportContent), &result)
|
||||
return result, err
|
||||
}
|
||||
|
|
|
@ -82,8 +82,8 @@ func (s *scanAPI) ScanArtifact(ctx context.Context, params operation.ScanArtifac
|
|||
if !distribution.IsDigest(params.Reference) {
|
||||
options = append(options, scan.WithTag(params.Reference))
|
||||
}
|
||||
if params.ScanRequestType != nil && validScanType(params.ScanRequestType.ScanType) {
|
||||
scanType = params.ScanRequestType.ScanType
|
||||
if params.ScanType != nil && validScanType(params.ScanType.ScanType) {
|
||||
scanType = params.ScanType.ScanType
|
||||
options = append(options, scan.WithScanType(scanType))
|
||||
}
|
||||
res := rbac.ResourceScan
|
||||
|
|
|
@ -26,6 +26,18 @@ Test Case - Get Harbor Version
|
|||
#Just get harbor version and log it
|
||||
Get Harbor Version
|
||||
|
||||
Test Case - Update OIDC Provider Name
|
||||
[Tags] oidc_provider_name
|
||||
Init Chrome Driver
|
||||
Sign In Harbor ${HARBOR_URL} ${HARBOR_ADMIN} ${HARBOR_PASSWORD} is_oidc=${true}
|
||||
# Set OIDC Provider Name to TestDex
|
||||
Switch To Configuration Authentication
|
||||
Retry Text Input //input[@id='oidcName'] TestDex
|
||||
Retry Element Click ${config_auth_save_button_xpath}
|
||||
Logout Harbor
|
||||
Retry Wait Until Page Contains Element //span[normalize-space()='LOGIN WITH TestDex']
|
||||
Close Browser
|
||||
|
||||
Test Case - OIDC User Sign In
|
||||
#Sign in with all 9 users is for user population, other test cases might use these users.
|
||||
Sign In Harbor With OIDC User ${HARBOR_URL}
|
||||
|
|
Loading…
Reference in New Issue