OWASP dependency-check for codecommit repositories
Project description
@cloudcomponents/cdk-dependency-check
OWASP dependency-check for codecommit repositories
Install
TypeScript/JavaScript:
npm i @cloudcomponents/cdk-dependency-check
Python:
pip install cloudcomponents.cdk-dependency-check
How to use
# Example automatically generated without compilation. See https://github.com/aws/jsii/issues/826
from aws_cdk.core import Construct, Stack, StackProps
from aws_cdk.aws_codecommit import Repository
from aws_cdk.aws_events import Schedule
from aws_cdk.aws_events_targets import SnsTopic
from aws_cdk.aws_s3 import Bucket
from aws_cdk.aws_sns import Topic
from aws_cdk.aws_sns_subscriptions import EmailSubscription
from cloudcomponents.cdk_dependency_check import CodeCommitDependencyCheck
class DependencyCheckStack(Stack):
def __init__(self, scope, id, *, description=None, env=None, stackName=None, tags=None, synthesizer=None, terminationProtection=None, analyticsReporting=None):
super().__init__(scope, id, description=description, env=env, stackName=stackName, tags=tags, synthesizer=synthesizer, terminationProtection=terminationProtection, analyticsReporting=analyticsReporting)
repository = Repository.from_repository_name(self, "Repository", process.env.REPOSITORY_NAME)
reports_bucket = Bucket(self, "Bucket")
# The following example runs a task every day at 4am
check = CodeCommitDependencyCheck(self, "CodeCommitDependencyCheck",
repository=repository,
reports_bucket=reports_bucket,
pre_check_command="npm i",
schedule=Schedule.cron(
minute="0",
hour="4"
)
)
check_topic = Topic(self, "CheckTopic")
check_topic.add_subscription(
EmailSubscription(process.env.DEVSECOPS_TEAM_EMAIL))
check.on_check_started("started",
target=SnsTopic(check_topic)
)
check.on_check_succeeded("succeeded",
target=SnsTopic(check_topic)
)
check.on_check_failed("failed",
target=SnsTopic(check_topic)
)
Upload HTML Reports
# Example automatically generated without compilation. See https://github.com/aws/jsii/issues/826
reports_bucket = Bucket(self, "Bucket")
# The following example runs a task every day at 4am
check = CodeCommitDependencyCheck(self, "CodeCommitDependencyCheck",
repository=repository,
reports_bucket=reports_bucket,
pre_check_command="npm i",
schedule=Schedule.cron(
minute="0",
hour="4"
)
)
API Reference
See API.md.
Example
See more complete examples.
License
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Close
Hashes for cloudcomponents.cdk-dependency-check-1.9.0.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7f402f9954124b2d63ba9774bfc51fea4935fdbfbed172c39cc284d79c803825 |
|
MD5 | a49e1b6f780fb8efd2596f9c08c914b9 |
|
BLAKE2b-256 | c95252cefc4df09eedc33821ce3d5e32f3484043d5745f4f65f2eba6166456aa |
Close
Hashes for cloudcomponents.cdk_dependency_check-1.9.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | e4dbf1d876589aead38ca2662fcfb74144a8902c8d3bf970025d4b24bd1030c8 |
|
MD5 | 206f4473686f75a259709bbf0ea4d0b1 |
|
BLAKE2b-256 | 14f03bbad6e1f2c1f1e81c77766d1f761402f882d3fbd37482c392428dbe8f0d |