openapi: 3.0.0
info:
version: '2018-05-10'
x-release: v4
title: Amazon CodeGuru Security AccountConfiguration Scans 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: Scans paths: /scans: 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: CreateScan description: Use to create a scan using code uploaded to an S3 bucket. responses: '200': description: Success content: application/json: schema: $ref: '#/components/schemas/CreateScanResponse' examples: CreateScan200Example: summary: Default CreateScan 200 response x-microcks-default: true value: resourceId: '500123' runId: '500123' scanName: example-resource scanNameArn: arn:aws:service:us-east-1:123456789012:resource/example scanState: example-value '480': description: InternalServerException content: application/json: schema: $ref: '#/components/schemas/InternalServerException' examples: CreateScan480Example: summary: Default CreateScan 480 response x-microcks-default: true value: example-value '481': description: ConflictException content: application/json: schema: $ref: '#/components/schemas/ConflictException' examples: CreateScan481Example: summary: Default CreateScan 481 response x-microcks-default: true value: example-value '482': description: ResourceNotFoundException content: application/json: schema: $ref: '#/components/schemas/ResourceNotFoundException' examples: CreateScan482Example: summary: Default CreateScan 482 response x-microcks-default: true value: example-value '483': description: ThrottlingException content: application/json: schema: $ref: '#/components/schemas/ThrottlingException' examples: CreateScan483Example: summary: Default CreateScan 483 response x-microcks-default: true value: example-value '484': description: ValidationException content: application/json: schema: $ref: '#/components/schemas/ValidationException' examples: CreateScan484Example: summary: Default CreateScan 484 response x-microcks-default: true value: example-value '485': description: AccessDeniedException content: application/json: schema: $ref: '#/components/schemas/AccessDeniedException' examples: CreateScan485Example: summary: Default CreateScan 485 response x-microcks-default: true value: example-value parameters: [] requestBody: required: true content: application/json: schema: type: object required: - resourceId - scanName properties: analysisType: description: The type of analysis you want CodeGuru Security to perform in the scan, eitherSecurity or All. The Security type only generates findings related to security. The All type generates both security findings and quality findings. Defaults to Security type if missing.
type: string
enum:
- Security
- All
clientToken:
description: The idempotency token for the request. Amazon CodeGuru Security uses this value to prevent the accidental creation of duplicate scans if there are failures and retries.
type: string
pattern: ^[\S]+$
minLength: 1
maxLength: 64
resourceId:
description: The identifier for a resource object that contains resources where a finding was detected.
type: object
properties:
codeArtifactId:
allOf:
- $ref: '#/components/schemas/Uuid'
- description: The identifier for the code file uploaded to the resource where a finding was detected.
scanName:
description: 'The unique name that CodeGuru Security uses to track revisions across multiple scans of the same resource. Only allowed for a STANDARD scan type. If not specified, it will be auto generated. '
type: string
pattern: ^[a-zA-Z0-9-_$:.]*$
minLength: 1
maxLength: 140
scanType:
description: The type of scan, either Standard or Express. Defaults to Standard type if missing.
Express scans run on limited resources and use a limited set of detectors to analyze your code in near-real time. Standard scans have standard resource limits and use the full set of detectors to analyze your code.
An array of key-value pairs used to tag a scan. A tag is a custom attribute label with two parts:
A tag key. For example, CostCenter, Environment, or Secret. Tag keys are case sensitive.
An optional tag value field. For example, 111122223333, Production, or a team name. Omitting the tag value is the same as using an empty string. Tag values are case sensitive.
nextToken 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
summary: Amazon CodeGuru Security List Scans
x-microcks-operation:
delay: 0
dispatcher: FALLBACK
tags:
- Scans
/scans/{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: GetScan
description: Returns details about a scan, including whether or not a scan has completed.
responses:
'200':
description: Success
content:
application/json:
schema:
$ref: '#/components/schemas/GetScanResponse'
examples:
GetScan200Example:
summary: Default GetScan 200 response
x-microcks-default: true
value:
analysisType: STANDARD
createdAt: example-value
numberOfRevisions: example-value
runId: '500123'
scanName: example-resource
scanNameArn: arn:aws:service:us-east-1:123456789012:resource/example
scanState: example-value
updatedAt: example-value
'480':
description: InternalServerException
content:
application/json:
schema:
$ref: '#/components/schemas/InternalServerException'
examples:
GetScan480Example:
summary: Default GetScan 480 response
x-microcks-default: true
value: example-value
'481':
description: ResourceNotFoundException
content:
application/json:
schema:
$ref: '#/components/schemas/ResourceNotFoundException'
examples:
GetScan481Example:
summary: Default GetScan 481 response
x-microcks-default: true
value: example-value
'482':
description: ThrottlingException
content:
application/json:
schema:
$ref: '#/components/schemas/ThrottlingException'
examples:
GetScan482Example:
summary: Default GetScan 482 response
x-microcks-default: true
value: example-value
'483':
description: AccessDeniedException
content:
application/json:
schema:
$ref: '#/components/schemas/AccessDeniedException'
examples:
GetScan483Example:
summary: Default GetScan 483 response
x-microcks-default: true
value: example-value
parameters:
- name: runId
in: query
required: false
description: UUID that identifies the individual scan run you want to view details about. You retrieve this when you call the CreateScan operation. Defaults to the latest scan run if missing.
schema:
type: string
pattern: ^[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}$
- name: scanName
in: path
required: true
description: The name of the scan you want to view details about.
schema:
type: string
pattern: ^[a-zA-Z0-9-_$:.]*$
minLength: 1
maxLength: 140
summary: Amazon CodeGuru Security Get Scan
x-microcks-operation:
delay: 0
dispatcher: FALLBACK
tags:
- Scans
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:
AnalysisType:
type: string
enum:
- Security
- All
ResourceNotFoundException: {}
Timestamp:
type: string
format: date-time
NextToken:
type: string
pattern: ^[\S]+$
minLength: 1
maxLength: 2048
ConflictException: {}
ScanState:
type: string
enum:
- InProgress
- Successful
- Failed
ScanSummaries:
type: array
items:
$ref: '#/components/schemas/ScanSummary'
CreateScanResponse:
type: object
required:
- resourceId
- runId
- scanName
- scanState
properties:
resourceId:
allOf:
- $ref: '#/components/schemas/ResourceId'
- description: The identifier for the resource object that contains resources that were scanned.
runId:
allOf:
- $ref: '#/components/schemas/Uuid'
- description: UUID that identifies the individual scan run.
scanName:
allOf:
- $ref: '#/components/schemas/ScanName'
- description: The name of the scan.
scanNameArn:
allOf:
- $ref: '#/components/schemas/ScanNameArn'
- description: The ARN for the scan name.
scanState:
allOf:
- $ref: '#/components/schemas/ScanState'
- description: The current state of the scan. Returns either InProgress, Successful, or Failed.
ResourceId:
type: object
properties:
codeArtifactId:
allOf:
- $ref: '#/components/schemas/Uuid'
- description: The identifier for the code file uploaded to the resource where a finding was detected.
description: The identifier for a resource object that contains resources where a finding was detected.
ListScansResponse:
type: object
properties:
nextToken:
allOf:
- $ref: '#/components/schemas/NextToken'
- description: A pagination token. You can use this in future calls to ListScans to continue listing results after the current page.
summaries:
allOf:
- $ref: '#/components/schemas/ScanSummaries'
- description: A list of ScanSummary objects with information about all scans in an account.
Uuid:
type: string
pattern: ^[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}$
TagValue:
type: string
minLength: 0
maxLength: 256
ThrottlingException: {}
GetScanResponse:
type: object
required:
- analysisType
- createdAt
- runId
- scanName
- scanState
properties:
analysisType:
allOf:
- $ref: '#/components/schemas/AnalysisType'
- description: The type of analysis CodeGuru Security performed in the scan, either Security or All. The Security type only generates findings related to security. The All type generates both security findings and quality findings.
createdAt:
allOf:
- $ref: '#/components/schemas/Timestamp'
- description: The time the scan was created.
numberOfRevisions:
allOf:
- $ref: '#/components/schemas/Long'
- description: The number of times a scan has been re-run on a revised resource.
runId:
allOf:
- $ref: '#/components/schemas/Uuid'
- description: UUID that identifies the individual scan run.
scanName:
allOf:
- $ref: '#/components/schemas/ScanName'
- description: The name of the scan.
scanNameArn:
allOf:
- $ref: '#/components/schemas/ScanNameArn'
- description: The ARN for the scan name.
scanState:
allOf:
- $ref: '#/components/schemas/ScanState'
- description: The current state of the scan. Pass either InProgress, Successful, or Failed.
updatedAt:
allOf:
- $ref: '#/components/schemas/Timestamp'
- description: The time when the scan was last updated. Only available for STANDARD scan types.
ValidationException: {}
ScanNameArn:
type: string
pattern: ^arn:aws:codeguru-security:[\S]+:[\d]{12}:scans\/[a-zA-Z0-9-_$:.]*$
minLength: 1
maxLength: 300
ScanSummary:
type: object
required:
- createdAt
- runId
- scanName
- scanState
properties:
createdAt:
allOf:
- $ref: '#/components/schemas/Timestamp'
- description: ' The time when the scan was created. '
runId:
allOf:
- $ref: '#/components/schemas/Uuid'
- description: 'The identifier for the scan run. '
scanName:
allOf:
- $ref: '#/components/schemas/ScanName'
- description: 'The name of the scan. '
scanNameArn:
allOf:
- $ref: '#/components/schemas/ScanNameArn'
- description: The ARN for the scan name.
scanState:
allOf:
- $ref: '#/components/schemas/ScanState'
- description: 'The state of the scan. A scan can be In Progress, Complete, or Failed. '
updatedAt:
allOf:
- $ref: '#/components/schemas/Timestamp'
- description: The time the scan was last updated. A scan is updated when it is re-run.
description: 'Information about a scan. '
ScanName:
type: string
pattern: ^[a-zA-Z0-9-_$:.]*$
minLength: 1
maxLength: 140
AccessDeniedException: {}
InternalServerException: {}
Long:
type: integer
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