openapi: 3.2.0
info:
version: '2018-05-10'
x-release: v4
title: Amazon CodeGuru Security Batch Get Findings API
description: Amazon CodeGuru Security is in preview release and is subject to change.
x-logo:
url: https://twitter.com/awscloud/profile_image?size=original
backgroundColor: '#FFFFFF'
termsOfService: https://aws.amazon.com/service-terms/
contact:
name: Mike Ralphson
email: mike.ralphson@gmail.com
url: https://github.com/mermade/aws2openapi
x-twitter: PermittedSoc
license:
name: Apache 2.0 License
url: http://www.apache.org/licenses/
x-providerName: amazonaws.com
x-serviceName: codeguru-security
x-aws-signingName: codeguru-security
x-origin:
- contentType: application/json
url: https://raw.githubusercontent.com/aws/aws-sdk-js/master/apis/codeguru-security-2018-05-10.normal.json
converter:
url: https://github.com/mermade/aws2openapi
version: 1.0.0
x-apisguru-driver: external
x-apiClientRegistration:
url: https://portal.aws.amazon.com/gp/aws/developer/registration/index.html?nc2=h_ct
x-apisguru-categories:
- cloud
x-preferred: true
servers:
- url: http://codeguru-security.{region}.amazonaws.com
variables:
region:
description: The AWS region
enum:
- us-east-1
- us-east-2
- us-west-1
- us-west-2
- us-gov-west-1
- us-gov-east-1
- ca-central-1
- eu-north-1
- eu-west-1
- eu-west-2
- eu-west-3
- eu-central-1
- eu-south-1
- af-south-1
- ap-northeast-1
- ap-northeast-2
- ap-northeast-3
- ap-southeast-1
- ap-southeast-2
- ap-east-1
- ap-south-1
- sa-east-1
- me-south-1
default: us-east-1
description: The Amazon CodeGuru Security multi-region endpoint
- url: https://codeguru-security.{region}.amazonaws.com
variables:
region:
description: The AWS region
enum:
- us-east-1
- us-east-2
- us-west-1
- us-west-2
- us-gov-west-1
- us-gov-east-1
- ca-central-1
- eu-north-1
- eu-west-1
- eu-west-2
- eu-west-3
- eu-central-1
- eu-south-1
- af-south-1
- ap-northeast-1
- ap-northeast-2
- ap-northeast-3
- ap-southeast-1
- ap-southeast-2
- ap-east-1
- ap-south-1
- sa-east-1
- me-south-1
default: us-east-1
description: The Amazon CodeGuru Security multi-region endpoint
- url: http://codeguru-security.{region}.amazonaws.com.cn
variables:
region:
description: The AWS region
enum:
- cn-north-1
- cn-northwest-1
default: cn-north-1
description: The Amazon CodeGuru Security endpoint for China (Beijing) and China (Ningxia)
- url: https://codeguru-security.{region}.amazonaws.com.cn
variables:
region:
description: The AWS region
enum:
- cn-north-1
- cn-northwest-1
default: cn-north-1
description: The Amazon CodeGuru Security endpoint for China (Beijing) and China (Ningxia)
security:
- hmac: []
tags:
- name: Batch Get Findings
paths:
/batchGetFindings:
parameters:
- $ref: '#/components/parameters/X-Amz-Content-Sha256'
- $ref: '#/components/parameters/X-Amz-Date'
- $ref: '#/components/parameters/X-Amz-Algorithm'
- $ref: '#/components/parameters/X-Amz-Credential'
- $ref: '#/components/parameters/X-Amz-Security-Token'
- $ref: '#/components/parameters/X-Amz-Signature'
- $ref: '#/components/parameters/X-Amz-SignedHeaders'
post:
operationId: BatchGetFindings
description: Returns a list of all requested findings.
responses:
'200':
description: Success
content:
application/json:
schema:
$ref: '#/components/schemas/BatchGetFindingsResponse'
examples:
BatchGetFindings200Example:
summary: Default BatchGetFindings 200 response
x-microcks-default: true
value:
failedFindings: example-value
findings: example-value
'480':
description: InternalServerException
content:
application/json:
schema:
$ref: '#/components/schemas/InternalServerException'
examples:
BatchGetFindings480Example:
summary: Default BatchGetFindings 480 response
x-microcks-default: true
value: example-value
'481':
description: ThrottlingException
content:
application/json:
schema:
$ref: '#/components/schemas/ThrottlingException'
examples:
BatchGetFindings481Example:
summary: Default BatchGetFindings 481 response
x-microcks-default: true
value: example-value
'482':
description: ValidationException
content:
application/json:
schema:
$ref: '#/components/schemas/ValidationException'
examples:
BatchGetFindings482Example:
summary: Default BatchGetFindings 482 response
x-microcks-default: true
value: example-value
'483':
description: AccessDeniedException
content:
application/json:
schema:
$ref: '#/components/schemas/AccessDeniedException'
examples:
BatchGetFindings483Example:
summary: Default BatchGetFindings 483 response
x-microcks-default: true
value: example-value
parameters: []
requestBody:
required: true
content:
application/json:
schema:
type: object
required:
- findingIdentifiers
properties:
findingIdentifiers:
description: A list of finding identifiers. Each identifier consists of a scanName and a findingId. You retrieve the findingId when you call GetFindings.
type: array
items:
$ref: '#/components/schemas/FindingIdentifier'
minItems: 1
maxItems: 25
examples:
BatchGetFindingsRequestExample:
summary: Default BatchGetFindings request
x-microcks-default: true
value:
findingIdentifiers:
- findingId: '500123'
scanName: example-resource
summary: Amazon CodeGuru Security Batch Get Findings
x-microcks-operation:
delay: 0
dispatcher: FALLBACK
tags:
- Batch Get Findings
components:
schemas:
Findings:
type: array
items:
$ref: '#/components/schemas/Finding'
Severity:
type: string
enum:
- Critical
- High
- Medium
- Low
- Info
BatchGetFindingsError:
type: object
required:
- errorCode
- findingId
- message
- scanName
properties:
errorCode:
allOf:
- $ref: '#/components/schemas/ErrorCode'
- description: A code associated with the type of error.
findingId:
allOf:
- $ref: '#/components/schemas/String'
- description: The finding ID of the finding that was not fetched.
message:
allOf:
- $ref: '#/components/schemas/String'
- description: Describes the error.
scanName:
allOf:
- $ref: '#/components/schemas/ScanName'
- description: The name of the scan that generated the finding.
description: Contains information about the error that caused a finding to fail to be retrieved.
AccessDeniedException: {}
String:
type: string
SuggestedFix:
type: object
properties:
code:
allOf:
- $ref: '#/components/schemas/String'
- description: 'The suggested code to add to your file. '
description:
allOf:
- $ref: '#/components/schemas/String'
- description: 'A description of the suggested code fix and why it is being suggested. '
description: Information about the suggested code fix to remediate a finding.
Integer:
type: integer
FindingIdentifier:
type: object
required:
- findingId
- scanName
properties:
findingId:
allOf:
- $ref: '#/components/schemas/String'
- description: The identifier for a finding.
scanName:
allOf:
- $ref: '#/components/schemas/String'
- description: 'The name of the scan that generated the finding. '
description: 'An object that contains information about a finding and the scan that generated it. '
BatchGetFindingsResponse:
type: object
required:
- failedFindings
- findings
properties:
failedFindings:
allOf:
- $ref: '#/components/schemas/BatchGetFindingsErrors'
- description: A list of errors for individual findings which were not fetched. Each BatchGetFindingsError contains the scanName, findingId, errorCode and error message.
findings:
allOf:
- $ref: '#/components/schemas/Findings'
- description: ' A list of all requested findings.'
ErrorCode:
type: string
enum:
- DUPLICATE_IDENTIFIER
- ITEM_DOES_NOT_EXIST
- INTERNAL_ERROR
- INVALID_FINDING_ID
- INVALID_SCAN_NAME
CodeSnippet:
type: array
items:
$ref: '#/components/schemas/CodeLine'
ValidationException: {}
Finding:
type: object
properties:
createdAt:
allOf:
- $ref: '#/components/schemas/Timestamp'
- description: The time when the finding was created.
description:
allOf:
- $ref: '#/components/schemas/String'
- description: A description of the finding.
detectorId:
allOf:
- $ref: '#/components/schemas/String'
- description: 'The identifier for the detector that detected the finding in your code. A detector is a defined rule based on industry standards and AWS best practices. '
detectorName:
allOf:
- $ref: '#/components/schemas/String'
- description: 'The name of the detector that identified the security vulnerability in your code. '
detectorTags:
allOf:
- $ref: '#/components/schemas/DetectorTags'
- description: One or more tags or categorizations that are associated with a detector. These tags are defined by type, programming language, or other classification such as maintainability or consistency.
generatorId:
allOf:
- $ref: '#/components/schemas/String'
- description: The identifier for the component that generated a finding such as AWSCodeGuruSecurity or AWSInspector.
id:
allOf:
- $ref: '#/components/schemas/String'
- description: The identifier for a finding.
remediation:
allOf:
- $ref: '#/components/schemas/Remediation'
- description: An object that contains the details about how to remediate a finding.
resource:
allOf:
- $ref: '#/components/schemas/Resource'
- description: The resource where Amazon CodeGuru Security detected a finding.
ruleId:
allOf:
- $ref: '#/components/schemas/String'
- description: The identifier for the rule that generated the finding.
severity:
allOf:
- $ref: '#/components/schemas/Severity'
- description: The severity of the finding.
status:
allOf:
- $ref: '#/components/schemas/Status'
- description: 'The status of the finding. A finding status can be open or closed. '
title:
allOf:
- $ref: '#/components/schemas/String'
- description: The title of the finding.
type:
allOf:
- $ref: '#/components/schemas/String'
- description: 'The type of finding. '
updatedAt:
allOf:
- $ref: '#/components/schemas/Timestamp'
- description: 'The time when the finding was last updated. Findings are updated when you remediate them or when the finding code location changes. '
vulnerability:
allOf:
- $ref: '#/components/schemas/Vulnerability'
- description: An object that describes the detected security vulnerability.
description: Information about a finding that was detected in your code.
ThrottlingException: {}
Status:
type: string
enum:
- Closed
- Open
- All
BatchGetFindingsErrors:
type: array
items:
$ref: '#/components/schemas/BatchGetFindingsError'
Resource:
type: object
properties:
id:
allOf:
- $ref: '#/components/schemas/String'
- description: The identifier for the resource.
subResourceId:
allOf:
- $ref: '#/components/schemas/String'
- description: The identifier for a section of the resource, such as an AWS Lambda layer.
description: Information about a resource, such as an Amazon S3 bucket or AWS Lambda function, that contains a finding.
Timestamp:
type: string
format: date-time
SuggestedFixes:
type: array
items:
$ref: '#/components/schemas/SuggestedFix'
InternalServerException: {}
RelatedVulnerabilities:
type: array
items:
$ref: '#/components/schemas/String'
CodeLine:
type: object
properties:
content:
allOf:
- $ref: '#/components/schemas/String'
- description: The code that contains a vulnerability.
number:
allOf:
- $ref: '#/components/schemas/Integer'
- description: The code line number.
description: The line of code where a finding was detected.
Recommendation:
type: object
properties:
text:
allOf:
- $ref: '#/components/schemas/String'
- description: The recommended course of action to remediate the finding.
url:
allOf:
- $ref: '#/components/schemas/String'
- description: 'The URL address to the recommendation for remediating the finding. '
description: Information about the recommended course of action to remediate a finding.
ReferenceUrls:
type: array
items:
$ref: '#/components/schemas/String'
FilePath:
type: object
properties:
codeSnippet:
allOf:
- $ref: '#/components/schemas/CodeSnippet'
- description: A list of CodeLine objects that describe where the security vulnerability appears in your code.
endLine:
allOf:
- $ref: '#/components/schemas/Integer'
- description: The last line number of the code snippet where the security vulnerability appears in your code.
name:
allOf:
- $ref: '#/components/schemas/String'
- description: The name of the file.
path:
allOf:
- $ref: '#/components/schemas/String'
- description: The path to the resource with the security vulnerability.
startLine:
allOf:
- $ref: '#/components/schemas/Integer'
- description: The first line number of the code snippet where the security vulnerability appears in your code.
description: Information about the location of security vulnerabilities that Amazon CodeGuru Security detected in your code.
Remediation:
type: object
properties:
recommendation:
allOf:
- $ref: '#/components/schemas/Recommendation'
- description: An object that contains information about the recommended course of action to remediate a finding.
suggestedFixes:
allOf:
- $ref: '#/components/schemas/SuggestedFixes'
- description: A list of SuggestedFix objects. Each object contains information about a suggested code fix to remediate the finding.
description: Information about how to remediate a finding.
Vulnerability:
type: object
properties:
filePath:
allOf:
- $ref: '#/components/schemas/FilePath'
- description: ' An object that describes the location of the detected security vulnerability in your code.'
id:
allOf:
- $ref: '#/components/schemas/String'
- description: The identifier for the vulnerability.
itemCount:
allOf:
- $ref: '#/components/schemas/Integer'
- description: ' The number of times the vulnerability appears in your code.'
referenceUrls:
allOf:
- $ref: '#/components/schemas/ReferenceUrls'
- description: One or more URL addresses that contain details about a vulnerability.
relatedVulnerabilities:
allOf:
- $ref: '#/components/schemas/RelatedVulnerabilities'
- description: One or more vulnerabilities that are related to the vulnerability being described.
description: Information about a security vulnerability that Amazon CodeGuru Security detected.
ScanName:
type: string
pattern: ^[a-zA-Z0-9-_$:.]*$
minLength: 1
maxLength: 140
DetectorTags:
type: array
items:
$ref: '#/components/schemas/String'
parameters:
X-Amz-Content-Sha256:
name: X-Amz-Content-Sha256
in: header
schema:
type: string
required: false
X-Amz-Signature:
name: X-Amz-Signature
in: header
schema:
type: string
required: false
X-Amz-Date:
name: X-Amz-Date
in: header
schema:
type: string
required: false
X-Amz-Credential:
name: X-Amz-Credential
in: header
schema:
type: string
required: false
X-Amz-SignedHeaders:
name: X-Amz-SignedHeaders
in: header
schema:
type: string
required: false
X-Amz-Security-Token:
name: X-Amz-Security-Token
in: header
schema:
type: string
required: false
X-Amz-Algorithm:
name: X-Amz-Algorithm
in: header
schema:
type: string
required: false
securitySchemes:
hmac:
type: apiKey
name: Authorization
in: header
description: Amazon Signature authorization v4
x-amazon-apigateway-authtype: awsSigv4
externalDocs:
description: Amazon Web Services documentation
url: https://docs.aws.amazon.com/codeguru-security/
x-hasEquivalentPaths: true