SecurityAgent class

AWS Security Agent is a frontier agent that proactively secures your applications throughout the development lifecycle. It conducts automated security reviews tailored to your organizational requirements and delivers context-aware penetration testing on demand. By continuously validating security from design to deployment, AWS Security Agent helps prevent vulnerabilities early across all your environments. Key capabilities include design security review for architecture documents, code security review for pull requests in connected repositories, and on-demand penetration testing that discovers, validates, and remediates security vulnerabilities through tailored multi-step attack scenarios. For more information, see the AWS Security Agent User Guide.

Constructors

SecurityAgent({required String region, AwsClientCredentials? credentials, AwsClientCredentialsProvider? credentialsProvider, Client? client, String? endpointUrl})

Properties

hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

addArtifact({required String agentSpaceId, required Uint8List artifactContent, required ArtifactType artifactType, required String fileName}) Future<AddArtifactOutput>
Uploads an artifact to an agent space. Artifacts provide additional context for security testing, such as architecture diagrams, API specifications, or configuration files.
batchDeleteCodeReviews({required String agentSpaceId, required List<String> codeReviewIds}) Future<BatchDeleteCodeReviewsOutput>
Deletes one or more code reviews from an agent space.
batchDeletePentests({required String agentSpaceId, required List<String> pentestIds}) Future<BatchDeletePentestsOutput>
Deletes one or more pentests from an agent space.
batchGetAgentSpaces({required List<String> agentSpaceIds}) Future<BatchGetAgentSpacesOutput>
Retrieves information about one or more agent spaces.
batchGetArtifactMetadata({required String agentSpaceId, required List<String> artifactIds}) Future<BatchGetArtifactMetadataOutput>
Retrieves metadata for one or more artifacts in an agent space.
batchGetCodeReviewJobs({required String agentSpaceId, required List<String> codeReviewJobIds}) Future<BatchGetCodeReviewJobsOutput>
Retrieves information about one or more code review jobs in an agent space.
batchGetCodeReviewJobTasks({required String agentSpaceId, required List<String> codeReviewJobTaskIds}) Future<BatchGetCodeReviewJobTasksOutput>
Retrieves information about one or more tasks within a code review job.
batchGetCodeReviews({required String agentSpaceId, required List<String> codeReviewIds}) Future<BatchGetCodeReviewsOutput>
Retrieves information about one or more code reviews in an agent space.
batchGetFindings({required String agentSpaceId, required List<String> findingIds}) Future<BatchGetFindingsOutput>
Retrieves information about one or more security findings in an agent space.
batchGetPentestJobs({required String agentSpaceId, required List<String> pentestJobIds}) Future<BatchGetPentestJobsOutput>
Retrieves information about one or more pentest jobs in an agent space.
batchGetPentestJobTasks({required String agentSpaceId, required List<String> taskIds}) Future<BatchGetPentestJobTasksOutput>
Retrieves information about one or more tasks within a pentest job.
batchGetPentests({required String agentSpaceId, required List<String> pentestIds}) Future<BatchGetPentestsOutput>
Retrieves information about one or more pentests in an agent space.
batchGetTargetDomains({required List<String> targetDomainIds}) Future<BatchGetTargetDomainsOutput>
Retrieves information about one or more target domains.
close() → void
Closes the internal HTTP client if none was provided at creation. If a client was passed as a constructor argument, this becomes a noop.
createAgentSpace({required String name, AWSResources? awsResources, CodeReviewSettings? codeReviewSettings, String? description, String? kmsKeyId, Map<String, String>? tags, List<String>? targetDomainIds}) Future<CreateAgentSpaceOutput>
Creates a new agent space. An agent space is a dedicated workspace for securing a specific application.
createApplication({String? defaultKmsKeyId, String? idcInstanceArn, String? roleArn, Map<String, String>? tags}) Future<CreateApplicationResponse>
Creates a new application. An application is the top-level organizational unit that supports IAM Identity Center integration.
createCodeReview({required String agentSpaceId, required Assets assets, required String title, CodeRemediationStrategy? codeRemediationStrategy, CloudWatchLog? logConfig, String? serviceRole}) Future<CreateCodeReviewOutput>
Creates a new code review configuration in an agent space. A code review defines the parameters for automated security-focused code analysis.
createIntegration({required ProviderInput input, required String integrationDisplayName, required Provider provider, String? kmsKeyId, Map<String, String>? tags}) Future<CreateIntegrationOutput>
Creates a new integration with a third-party provider, such as GitHub, for code review and remediation.
createMembership({required String agentSpaceId, required String applicationId, required MembershipType memberType, required String membershipId, MembershipConfig? config}) Future<void>
Creates a new membership, granting a user access to an agent space within an application.
createPentest({required String agentSpaceId, required String title, Assets? assets, CodeRemediationStrategy? codeRemediationStrategy, List<RiskType>? excludeRiskTypes, CloudWatchLog? logConfig, NetworkTrafficConfig? networkTrafficConfig, String? serviceRole, VpcConfig? vpcConfig}) Future<CreatePentestOutput>
Creates a new pentest configuration in an agent space. A pentest defines the security test parameters, including target assets, risk type exclusions, and logging configuration.
createTargetDomain({required String targetDomainName, required DomainVerificationMethod verificationMethod, Map<String, String>? tags}) Future<CreateTargetDomainOutput>
Creates a new target domain for penetration testing. A target domain is a web domain that must be registered and verified before it can be tested.
deleteAgentSpace({required String agentSpaceId}) Future<DeleteAgentSpaceOutput>
Deletes an agent space and all of its associated resources, including pentests, findings, and artifacts.
deleteApplication({required String applicationId}) Future<void>
Deletes an application and its associated configuration, including IAM Identity Center settings.
deleteArtifact({required String agentSpaceId, required String artifactId}) Future<void>
Deletes an artifact from an agent space.
deleteIntegration({required String integrationId}) Future<void>
Deletes an integration with a third-party provider.
deleteMembership({required String agentSpaceId, required String applicationId, required String membershipId, MembershipType? memberType}) Future<void>
Deletes a membership, revoking a user's access to an agent space.
deleteTargetDomain({required String targetDomainId}) Future<DeleteTargetDomainOutput>
Deletes a target domain registration. After deletion, the domain can no longer be used for penetration testing.
getApplication({required String applicationId}) Future<GetApplicationResponse>
Retrieves information about an application.
getArtifact({required String agentSpaceId, required String artifactId}) Future<GetArtifactOutput>
Retrieves an artifact from an agent space.
getIntegration({required String integrationId}) Future<GetIntegrationOutput>
Retrieves information about an integration.
initiateProviderRegistration({required Provider provider}) Future<InitiateProviderRegistrationOutput>
Initiates the OAuth registration flow with a third-party provider. Returns a redirect URL and CSRF state token for completing the authorization.
listAgentSpaces({int? maxResults, String? nextToken}) Future<ListAgentSpacesOutput>
Returns a paginated list of agent space summaries in your account.
listApplications({int? maxResults, String? nextToken}) Future<ListApplicationsResponse>
Returns a paginated list of application summaries in your account.
listArtifacts({required String agentSpaceId, int? maxResults, String? nextToken}) Future<ListArtifactsOutput>
Returns a paginated list of artifact summaries for the specified agent space.
listCodeReviewJobsForCodeReview({required String agentSpaceId, required String codeReviewId, int? maxResults, String? nextToken}) Future<ListCodeReviewJobsForCodeReviewOutput>
Returns a paginated list of code review job summaries for the specified code review configuration.
listCodeReviewJobTasks({required String agentSpaceId, String? categoryName, String? codeReviewJobId, int? maxResults, String? nextToken, StepName? stepName}) Future<ListCodeReviewJobTasksOutput>
Returns a paginated list of task summaries for the specified code review job, optionally filtered by step name or category.
listCodeReviews({required String agentSpaceId, int? maxResults, String? nextToken}) Future<ListCodeReviewsOutput>
Returns a paginated list of code review summaries for the specified agent space.
listDiscoveredEndpoints({required String agentSpaceId, required String pentestJobId, int? maxResults, String? nextToken, String? prefix}) Future<ListDiscoveredEndpointsOutput>
Returns a paginated list of endpoints discovered during a pentest job execution.
listFindings({required String agentSpaceId, String? codeReviewJobId, ConfidenceLevel? confidence, int? maxResults, String? name, String? nextToken, String? pentestJobId, RiskLevel? riskLevel, String? riskType, FindingStatus? status}) Future<ListFindingsOutput>
Lists the security findings for a pentest job.
listIntegratedResources({required String agentSpaceId, String? integrationId, int? maxResults, String? nextToken, ResourceType? resourceType}) Future<ListIntegratedResourcesOutput>
Lists the integrated resources for an agent space, optionally filtered by integration or resource type.
listIntegrations({IntegrationFilter? filter, int? maxResults, String? nextToken}) Future<ListIntegrationsOutput>
Lists the integrations in your account, optionally filtered by provider or provider type.
listMemberships({required String agentSpaceId, required String applicationId, int? maxResults, MembershipTypeFilter? memberType, String? nextToken}) Future<ListMembershipsResponse>
Returns a paginated list of membership summaries for the specified agent space within an application.
listPentestJobsForPentest({required String agentSpaceId, required String pentestId, int? maxResults, String? nextToken}) Future<ListPentestJobsForPentestOutput>
Returns a paginated list of pentest job summaries for the specified pentest configuration.
listPentestJobTasks({required String agentSpaceId, String? categoryName, int? maxResults, String? nextToken, String? pentestJobId, StepName? stepName}) Future<ListPentestJobTasksOutput>
Returns a paginated list of task summaries for the specified pentest job, optionally filtered by step name or category.
listPentests({required String agentSpaceId, int? maxResults, String? nextToken}) Future<ListPentestsOutput>
Returns a paginated list of pentest summaries for the specified agent space.
listTagsForResource({required String resourceArn}) Future<ListTagsForResourceOutput>
Returns the tags associated with the specified resource.
listTargetDomains({int? maxResults, String? nextToken}) Future<ListTargetDomainsOutput>
Returns a paginated list of target domain summaries in your account.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
startCodeRemediation({required String agentSpaceId, required List<String> findingIds, String? codeReviewJobId, String? pentestJobId}) Future<void>
Initiates code remediation for one or more security findings. This creates pull requests in integrated repositories to fix the identified vulnerabilities.
startCodeReviewJob({required String agentSpaceId, required String codeReviewId}) Future<StartCodeReviewJobOutput>
Starts a new code review job for a code review configuration. The job executes the security-focused code analysis defined in the code review.
startPentestJob({required String agentSpaceId, required String pentestId}) Future<StartPentestJobOutput>
Starts a new pentest job for a pentest configuration. The job executes the security tests defined in the pentest.
stopCodeReviewJob({required String agentSpaceId, required String codeReviewJobId}) Future<void>
Stops a running code review job. The job transitions to a stopping state and then to stopped after cleanup completes.
stopPentestJob({required String agentSpaceId, required String pentestJobId}) Future<void>
Stops a running pentest job. The job transitions to a stopping state and then to stopped after cleanup completes.
tagResource({required String resourceArn, required Map<String, String> tags}) Future<void>
Adds tags to a resource.
toString() String
A string representation of this object.
inherited
untagResource({required String resourceArn, required List<String> tagKeys}) Future<void>
Removes tags from a resource.
updateAgentSpace({required String agentSpaceId, AWSResources? awsResources, CodeReviewSettings? codeReviewSettings, String? description, String? name, List<String>? targetDomainIds}) Future<UpdateAgentSpaceOutput>
Updates the configuration of an existing agent space, including its name, description, AWS resources, target domains, and code review settings.
updateApplication({required String applicationId, String? defaultKmsKeyId, String? roleArn}) Future<UpdateApplicationResponse>
Updates the configuration of an existing application, including the IAM role and default KMS key.
updateCodeReview({required String agentSpaceId, required String codeReviewId, Assets? assets, CodeRemediationStrategy? codeRemediationStrategy, CloudWatchLog? logConfig, String? serviceRole, String? title}) Future<UpdateCodeReviewOutput>
Updates an existing code review configuration.
updateFinding({required String agentSpaceId, required String findingId, RiskLevel? riskLevel, FindingStatus? status}) Future<void>
Updates the status or risk level of a security finding.
updateIntegratedResources({required String agentSpaceId, required String integrationId, required List<IntegratedResourceInputItem> items}) Future<void>
Updates the integrated resources for an agent space, including their capabilities.
updatePentest({required String agentSpaceId, required String pentestId, Assets? assets, CodeRemediationStrategy? codeRemediationStrategy, List<RiskType>? excludeRiskTypes, CloudWatchLog? logConfig, NetworkTrafficConfig? networkTrafficConfig, String? serviceRole, String? title, VpcConfig? vpcConfig}) Future<UpdatePentestOutput>
Updates an existing pentest configuration.
updateTargetDomain({required String targetDomainId, required DomainVerificationMethod verificationMethod}) Future<UpdateTargetDomainOutput>
Updates the verification method for a target domain.
verifyTargetDomain({required String targetDomainId}) Future<VerifyTargetDomainOutput>
Initiates verification of a target domain. This checks whether the domain ownership verification token has been properly configured.

Operators

operator ==(Object other) bool
The equality operator.
inherited