cloudcomponents.cdk-dependency-check


Namecloudcomponents.cdk-dependency-check JSON
Version 2.3.0 PyPI version JSON
download
home_pagehttps://github.com/cloudcomponents/cdk-constructs
SummaryOWASP dependency-check for codecommit repositories
upload_time2024-05-16 19:33:18
maintainerNone
docs_urlNone
authorhupe1980
requires_python~=3.8
licenseMIT
keywords
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            [![cloudcomponents Logo](https://raw.githubusercontent.com/cloudcomponents/cdk-constructs/master/logo.png)](https://github.com/cloudcomponents/cdk-constructs)

# @cloudcomponents/cdk-dependency-check

[![Build Status](https://github.com/cloudcomponents/cdk-constructs/workflows/Build/badge.svg)](https://github.com/cloudcomponents/cdk-constructs/actions?query=workflow=Build)
[![cdkdx](https://img.shields.io/badge/buildtool-cdkdx-blue.svg)](https://github.com/hupe1980/cdkdx)
[![typescript](https://img.shields.io/badge/jsii-typescript-blueviolet.svg)](https://www.npmjs.com/package/@cloudcomponents/cdk-dependency-check)
[![python](https://img.shields.io/badge/jsii-python-blueviolet.svg)](https://pypi.org/project/cloudcomponents.cdk-dependency-check/)

> [OWASP dependency-check](https://owasp.org/www-project-dependency-check/) for codecommit repositories

## Install

TypeScript/JavaScript:

```bash
npm i @cloudcomponents/cdk-dependency-check
```

Python:

```bash
pip install cloudcomponents.cdk-dependency-check
```

## How to use

```python
import { CodeCommitDependencyCheck } from '@cloudcomponents/cdk-dependency-check';
import { Stack, StackProps } from 'aws-cdk-lib';
import { Repository } from 'aws-cdk-lib/aws-codecommit';
import { Schedule } from 'aws-cdk-lib/aws-events';
import { SnsTopic } from 'aws-cdk-lib/aws-events-targets';
import { Bucket } from 'aws-cdk-lib/aws-s3';
import { Topic } from 'aws-cdk-lib/aws-sns';
import { EmailSubscription } from 'aws-cdk-lib/aws-sns-subscriptions';
import { Construct } from 'constructs';

export class DependencyCheckStack extends Stack {
  constructor(scope: Construct, id: string, props?: StackProps) {
    super(scope, id, props);

    if (typeof process.env.REPOSITORY_NAME === 'undefined') {
      throw new Error('environment variable REPOSITORY_NAME undefined');
    }

    const repository = Repository.fromRepositoryName(this, 'Repository', process.env.REPOSITORY_NAME);

    const reportsBucket = new Bucket(this, 'Bucket');

    // The following example runs a task every day at 4am
    const check = new CodeCommitDependencyCheck(this, 'CodeCommitDependencyCheck', {
      repository,
      reportsBucket,
      preCheckCommand: 'npm i',
      schedule: Schedule.cron({
        minute: '0',
        hour: '4',
      }),
    });

    const checkTopic = new Topic(this, 'CheckTopic');

    if (process.env.DEVSECOPS_TEAM_EMAIL) {
      checkTopic.addSubscription(new EmailSubscription(process.env.DEVSECOPS_TEAM_EMAIL));
    }

    check.onCheckStarted('started', {
      target: new SnsTopic(checkTopic),
    });

    check.onCheckSucceeded('succeeded', {
      target: new SnsTopic(checkTopic),
    });

    check.onCheckFailed('failed', {
      target: new SnsTopic(checkTopic),
    });
  }
}
```

## Upload HTML Reports

```python
const reportsBucket = new Bucket(this, 'Bucket');

// The following example runs a task every day at 4am
const check = new CodeCommitDependencyCheck(this, 'CodeCommitDependencyCheck', {
  repository,
  reportsBucket,
  preCheckCommand: 'npm i',
  schedule: Schedule.cron({
    minute: '0',
    hour: '4',
  }),
});
```

## API Reference

See [API.md](https://github.com/cloudcomponents/cdk-constructs/tree/master/packages/cdk-dependency-check/API.md).

## Example

See more complete [examples](https://github.com/cloudcomponents/cdk-constructs/tree/master/examples).

## License

[MIT](https://github.com/cloudcomponents/cdk-constructs/tree/master/packages/cdk-dependency-check/LICENSE)

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/cloudcomponents/cdk-constructs",
    "name": "cloudcomponents.cdk-dependency-check",
    "maintainer": null,
    "docs_url": null,
    "requires_python": "~=3.8",
    "maintainer_email": null,
    "keywords": null,
    "author": "hupe1980",
    "author_email": null,
    "download_url": "https://files.pythonhosted.org/packages/ec/9d/c01c1135f30be9c8409352da97b1cc6da9bc14bdaced4034dab69d4107b1/cloudcomponents.cdk-dependency-check-2.3.0.tar.gz",
    "platform": null,
    "description": "[![cloudcomponents Logo](https://raw.githubusercontent.com/cloudcomponents/cdk-constructs/master/logo.png)](https://github.com/cloudcomponents/cdk-constructs)\n\n# @cloudcomponents/cdk-dependency-check\n\n[![Build Status](https://github.com/cloudcomponents/cdk-constructs/workflows/Build/badge.svg)](https://github.com/cloudcomponents/cdk-constructs/actions?query=workflow=Build)\n[![cdkdx](https://img.shields.io/badge/buildtool-cdkdx-blue.svg)](https://github.com/hupe1980/cdkdx)\n[![typescript](https://img.shields.io/badge/jsii-typescript-blueviolet.svg)](https://www.npmjs.com/package/@cloudcomponents/cdk-dependency-check)\n[![python](https://img.shields.io/badge/jsii-python-blueviolet.svg)](https://pypi.org/project/cloudcomponents.cdk-dependency-check/)\n\n> [OWASP dependency-check](https://owasp.org/www-project-dependency-check/) for codecommit repositories\n\n## Install\n\nTypeScript/JavaScript:\n\n```bash\nnpm i @cloudcomponents/cdk-dependency-check\n```\n\nPython:\n\n```bash\npip install cloudcomponents.cdk-dependency-check\n```\n\n## How to use\n\n```python\nimport { CodeCommitDependencyCheck } from '@cloudcomponents/cdk-dependency-check';\nimport { Stack, StackProps } from 'aws-cdk-lib';\nimport { Repository } from 'aws-cdk-lib/aws-codecommit';\nimport { Schedule } from 'aws-cdk-lib/aws-events';\nimport { SnsTopic } from 'aws-cdk-lib/aws-events-targets';\nimport { Bucket } from 'aws-cdk-lib/aws-s3';\nimport { Topic } from 'aws-cdk-lib/aws-sns';\nimport { EmailSubscription } from 'aws-cdk-lib/aws-sns-subscriptions';\nimport { Construct } from 'constructs';\n\nexport class DependencyCheckStack extends Stack {\n  constructor(scope: Construct, id: string, props?: StackProps) {\n    super(scope, id, props);\n\n    if (typeof process.env.REPOSITORY_NAME === 'undefined') {\n      throw new Error('environment variable REPOSITORY_NAME undefined');\n    }\n\n    const repository = Repository.fromRepositoryName(this, 'Repository', process.env.REPOSITORY_NAME);\n\n    const reportsBucket = new Bucket(this, 'Bucket');\n\n    // The following example runs a task every day at 4am\n    const check = new CodeCommitDependencyCheck(this, 'CodeCommitDependencyCheck', {\n      repository,\n      reportsBucket,\n      preCheckCommand: 'npm i',\n      schedule: Schedule.cron({\n        minute: '0',\n        hour: '4',\n      }),\n    });\n\n    const checkTopic = new Topic(this, 'CheckTopic');\n\n    if (process.env.DEVSECOPS_TEAM_EMAIL) {\n      checkTopic.addSubscription(new EmailSubscription(process.env.DEVSECOPS_TEAM_EMAIL));\n    }\n\n    check.onCheckStarted('started', {\n      target: new SnsTopic(checkTopic),\n    });\n\n    check.onCheckSucceeded('succeeded', {\n      target: new SnsTopic(checkTopic),\n    });\n\n    check.onCheckFailed('failed', {\n      target: new SnsTopic(checkTopic),\n    });\n  }\n}\n```\n\n## Upload HTML Reports\n\n```python\nconst reportsBucket = new Bucket(this, 'Bucket');\n\n// The following example runs a task every day at 4am\nconst check = new CodeCommitDependencyCheck(this, 'CodeCommitDependencyCheck', {\n  repository,\n  reportsBucket,\n  preCheckCommand: 'npm i',\n  schedule: Schedule.cron({\n    minute: '0',\n    hour: '4',\n  }),\n});\n```\n\n## API Reference\n\nSee [API.md](https://github.com/cloudcomponents/cdk-constructs/tree/master/packages/cdk-dependency-check/API.md).\n\n## Example\n\nSee more complete [examples](https://github.com/cloudcomponents/cdk-constructs/tree/master/examples).\n\n## License\n\n[MIT](https://github.com/cloudcomponents/cdk-constructs/tree/master/packages/cdk-dependency-check/LICENSE)\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "OWASP dependency-check for codecommit repositories",
    "version": "2.3.0",
    "project_urls": {
        "Homepage": "https://github.com/cloudcomponents/cdk-constructs",
        "Source": "https://github.com/cloudcomponents/cdk-constructs.git"
    },
    "split_keywords": [],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "5e92e8a62c2bc7affe9a3a7b1af2be5f03236a16aa35f70a1bea17cc7c338801",
                "md5": "e3fbb894fcc21125b56d41247daa0b83",
                "sha256": "760f29b68e95d7e23c1f06b509a24bf3775bf78a06913c3c50536cd8f26f0ffd"
            },
            "downloads": -1,
            "filename": "cloudcomponents.cdk_dependency_check-2.3.0-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "e3fbb894fcc21125b56d41247daa0b83",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": "~=3.8",
            "size": 82875,
            "upload_time": "2024-05-16T19:33:05",
            "upload_time_iso_8601": "2024-05-16T19:33:05.273187Z",
            "url": "https://files.pythonhosted.org/packages/5e/92/e8a62c2bc7affe9a3a7b1af2be5f03236a16aa35f70a1bea17cc7c338801/cloudcomponents.cdk_dependency_check-2.3.0-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "ec9dc01c1135f30be9c8409352da97b1cc6da9bc14bdaced4034dab69d4107b1",
                "md5": "0488966190a0c718d63bd7e4c9e16421",
                "sha256": "e262756848c67e82967d19f6eaa4fc2d302973a633c4a8e944b6ca8c13dadfa1"
            },
            "downloads": -1,
            "filename": "cloudcomponents.cdk-dependency-check-2.3.0.tar.gz",
            "has_sig": false,
            "md5_digest": "0488966190a0c718d63bd7e4c9e16421",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": "~=3.8",
            "size": 84278,
            "upload_time": "2024-05-16T19:33:18",
            "upload_time_iso_8601": "2024-05-16T19:33:18.249311Z",
            "url": "https://files.pythonhosted.org/packages/ec/9d/c01c1135f30be9c8409352da97b1cc6da9bc14bdaced4034dab69d4107b1/cloudcomponents.cdk-dependency-check-2.3.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-05-16 19:33:18",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "cloudcomponents",
    "github_project": "cdk-constructs",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "lcname": "cloudcomponents.cdk-dependency-check"
}
        
Elapsed time: 0.25425s