openapi: 3.0.0
info:
version: '2018-05-10'
x-release: v4
title: Amazon CodeGuru Security AccountConfiguration Findings API
description: Amazon CodeGuru Security is in preview release and is subject to change.
This section provides documentation for the Amazon CodeGuru Security API operations. CodeGuru Security is a service that uses program analysis and machine learning to detect security policy violations and vulnerabilities, and recommends ways to address these security risks.
By proactively detecting and providing recommendations for addressing security risks, CodeGuru Security improves the overall security of your application code. For more information about CodeGuru Security, see the Amazon CodeGuru Security User Guide.
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: Findings paths: /findings/{scanName}: 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' get: operationId: GetFindings description: Returns a list of all findings generated by a particular scan. responses: '200': description: Success content: application/json: schema: $ref: '#/components/schemas/GetFindingsResponse' examples: GetFindings200Example: summary: Default GetFindings 200 response x-microcks-default: true value: findings: example-value nextToken: example-value '480': description: InternalServerException content: application/json: schema: $ref: '#/components/schemas/InternalServerException' examples: GetFindings480Example: summary: Default GetFindings 480 response x-microcks-default: true value: example-value '481': description: ConflictException content: application/json: schema: $ref: '#/components/schemas/ConflictException' examples: GetFindings481Example: summary: Default GetFindings 481 response x-microcks-default: true value: example-value '482': description: ResourceNotFoundException content: application/json: schema: $ref: '#/components/schemas/ResourceNotFoundException' examples: GetFindings482Example: summary: Default GetFindings 482 response x-microcks-default: true value: example-value '483': description: ThrottlingException content: application/json: schema: $ref: '#/components/schemas/ThrottlingException' examples: GetFindings483Example: summary: Default GetFindings 483 response x-microcks-default: true value: example-value '484': description: ValidationException content: application/json: schema: $ref: '#/components/schemas/ValidationException' examples: GetFindings484Example: summary: Default GetFindings 484 response x-microcks-default: true value: example-value '485': description: AccessDeniedException content: application/json: schema: $ref: '#/components/schemas/AccessDeniedException' examples: GetFindings485Example: summary: Default GetFindings 485 response x-microcks-default: true value: example-value parameters: - name: maxResults in: query required: false description: The maximum number of results to return in the response. Use this parameter when paginating results. If additional results exist beyond the number you specify, thenextToken element is returned in the response. Use nextToken in a subsequent request to retrieve additional results.
schema:
type: integer
minimum: 1
maximum: 100
- name: nextToken
in: query
required: false
description: A token to use for paginating results that are returned in the response. Set the value of this parameter to null for the first request. For subsequent calls, use the nextToken value returned from the previous request to continue listing results after the first page.
schema:
type: string
pattern: ^[\S]+$
minLength: 1
maxLength: 2048
- name: scanName
in: path
required: true
description: The name of the scan you want to retrieve findings from.
schema:
type: string
pattern: ^[a-zA-Z0-9-_$:.]*$
minLength: 1
maxLength: 140
- name: status
in: query
required: false
description: The status of the findings you want to get. Pass either Open, Closed, or All.
schema:
type: string
enum:
- Closed
- Open
- All
summary: Amazon CodeGuru Security Get Findings
x-microcks-operation:
delay: 0
dispatcher: FALLBACK
tags:
- Findings
components:
parameters:
X-Amz-Content-Sha256:
name: X-Amz-Content-Sha256
in: header
schema:
type: string
required: false
X-Amz-Date:
name: X-Amz-Date
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-SignedHeaders:
name: X-Amz-SignedHeaders
in: header
schema:
type: string
required: false
X-Amz-Algorithm:
name: X-Amz-Algorithm
in: header
schema:
type: string
required: false
X-Amz-Signature:
name: X-Amz-Signature
in: header
schema:
type: string
required: false
X-Amz-Credential:
name: X-Amz-Credential
in: header
schema:
type: string
required: false
schemas:
ResourceNotFoundException: {}
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.
Timestamp:
type: string
format: date-time
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.
NextToken:
type: string
pattern: ^[\S]+$
minLength: 1
maxLength: 2048
ConflictException: {}
ReferenceUrls:
type: array
items:
$ref: '#/components/schemas/String'
SuggestedFixes:
type: array
items:
$ref: '#/components/schemas/SuggestedFix'
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.
Findings:
type: array
items:
$ref: '#/components/schemas/Finding'
DetectorTags:
type: array
items:
$ref: '#/components/schemas/String'
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.
RelatedVulnerabilities:
type: array
items:
$ref: '#/components/schemas/String'
Integer:
type: integer
Severity:
type: string
enum:
- Critical
- High
- Medium
- Low
- Info
CodeSnippet:
type: array
items:
$ref: '#/components/schemas/CodeLine'
Status:
type: string
enum:
- Closed
- Open
- All
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.
ThrottlingException: {}
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.
String:
type: string
ValidationException: {}
GetFindingsResponse:
type: object
properties:
findings:
allOf:
- $ref: '#/components/schemas/Findings'
- description: A list of findings generated by the specified scan.
nextToken:
allOf:
- $ref: '#/components/schemas/NextToken'
- description: 'A pagination token. You can use this in future calls to GetFindings to continue listing results after the current page. '
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.
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.
AccessDeniedException: {}
InternalServerException: {}
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