Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

secure-cdk

Package Overview
Dependencies
Maintainers
1
Versions
24
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

secure-cdk - npm Package Compare versions

Comparing version 0.1.9 to 0.1.10-alpha.0

lib/services/iam.d.ts

6

lib/services/cloudfront.js

@@ -13,3 +13,3 @@ "use strict";

constructor(scope, id, props) {
utils_1.warnIfNotEquals(props === null || props === void 0 ? void 0 : props.minimumProtocolVersion, aws_cloudfront_1.SecurityPolicyProtocol.TLS_V1_2_2021, DistributionSecurityWarning.ProtocolVersionIsOutdated);
(0, utils_1.warnIfNotEquals)(props === null || props === void 0 ? void 0 : props.minimumProtocolVersion, aws_cloudfront_1.SecurityPolicyProtocol.TLS_V1_2_2021, DistributionSecurityWarning.ProtocolVersionIsOutdated);
super(scope, id, {

@@ -23,3 +23,3 @@ minimumProtocolVersion: aws_cloudfront_1.SecurityPolicyProtocol.TLS_V1_2_2021,

const createSecureBehavior = (behaviorOptions) => {
utils_1.warnIfEquals(behaviorOptions.viewerProtocolPolicy, aws_cloudfront_1.ViewerProtocolPolicy.ALLOW_ALL, DistributionSecurityWarning.HttpTrafficAllowed);
(0, utils_1.warnIfEquals)(behaviorOptions.viewerProtocolPolicy, aws_cloudfront_1.ViewerProtocolPolicy.ALLOW_ALL, DistributionSecurityWarning.HttpTrafficAllowed);
return {

@@ -31,2 +31,2 @@ viewerProtocolPolicy: aws_cloudfront_1.ViewerProtocolPolicy.HTTPS_ONLY,

exports.createSecureBehavior = createSecureBehavior;
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY2xvdWRmcm9udC5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbImNsb3VkZnJvbnQudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7O0FBQUEsNERBQXlJO0FBR3pJLHNDQUEyRD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gYmVoYXZpb3IuJ1xufVxuXG5leHBvcnQgY2xhc3MgU2VjdXJlRGlzdHJpYnV0aW9uIGV4dGVuZHMgRGlzdHJpYnV0aW9uIHtcbiAgY29uc3RydWN0b3Ioc2NvcGU6IENvbnN0cnVjdCwgaWQ6IHN0cmluZywgcHJvcHM/OiBEaXN0cmlidXRpb25Qcm9wcykge1xuICAgIHdhcm5JZk5vdEVxdWFscyhwcm9wcz8ubWluaW11bVByb3RvY29sVmVyc2lvbiwgU2VjdXJpdHlQb2xpY3lQcm90b2NvbC5UTFNfVjFfMl8yMDIxLCBEaXN0cmlidXRpb25TZWN1cml0eVdhcm5pbmcuUHJvdG9jb2xWZXJzaW9uSXNPdXRkYXRlZCk7XG5cbiAgICBzdXBlcihzY29wZSwgaWQsIHtcbiAgICAgIG1pbmltdW1Qcm90b2NvbFZlcnNpb246IFNlY3VyaXR5UG9saWN5UHJvdG9jb2wuVExTX1YxXzJfMjAyMSxcbiAgICAgIC4uLnByb3BzXG4gICAgfSBhcyBEaXN0cmlidXRpb25Qcm9wcyk7XG4gIH1cbn1cblxuZXhwb3J0IGNvbnN0IGNyZWF0ZVNlY3VyZUJlaGF2aW9yID0gKGJlaGF2aW9yT3B0aW9uczogQmVoYXZpb3JPcHRpb25zKTogQmVoYXZpb3JPcHRpb25zID0+IHtcbiAgd2FybklmRXF1YWxzKGJlaGF2aW9yT3B0aW9ucy52aWV3ZXJQcm90b2NvbFBvbGljeSwgVmlld2VyUHJvdG9jb2xQb2xpY3kuQUxMT1dfQUxMLCBEaXN0cmlidXRpb25TZWN1cml0eVdhcm5pbmcuSHR0cFRyYWZmaWNBbGxvd2VkKTtcblxuICByZXR1cm4ge1xuICAgIHZpZXdlclByb3RvY29sUG9saWN5OiBWaWV3ZXJQcm90b2NvbFBvbGljeS5IVFRQU19PTkxZLFxuICAgIC4uLmJlaGF2aW9yT3B0aW9uc1xuICB9XG59O1xuIl19
export * from './s3';
export * from './cloudfront';
export * from './iam';

@@ -15,2 +15,3 @@ "use strict";

__exportStar(require("./cloudfront"), exports);
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyJpbmRleC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7Ozs7Ozs7Ozs7QUFBQSx1Q0FBcUI7QUFDckIsK0NBQTZCIiwic291cmNlc0NvbnRlbnQiOlsiZXhwb3J0ICogZnJvbSAnLi9zMyc7XG5leHBvcnQgKiBmcm9tICcuL2Nsb3VkZnJvbnQnO1xuIl19
__exportStar(require("./iam"), exports);
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyJpbmRleC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7Ozs7Ozs7Ozs7QUFBQSx1Q0FBcUI7QUFDckIsK0NBQTZCO0FBQzdCLHdDQUFzQiIsInNvdXJjZXNDb250ZW50IjpbImV4cG9ydCAqIGZyb20gJy4vczMnO1xuZXhwb3J0ICogZnJvbSAnLi9jbG91ZGZyb250JztcbmV4cG9ydCAqIGZyb20gJy4vaWFtJztcbiJdfQ==

@@ -14,5 +14,5 @@ "use strict";

constructor(scope, id, props) {
utils_1.warnIfEquals(props === null || props === void 0 ? void 0 : props.enforceSSL, false, BucketSecurityWarning.SSLIsNotEnforced);
utils_1.warnIfEquals(props === null || props === void 0 ? void 0 : props.publicReadAccess, true, BucketSecurityWarning.PublicReadAccessEnabled);
utils_1.warnIfEquals(props === null || props === void 0 ? void 0 : props.encryption, aws_s3_1.BucketEncryption.UNENCRYPTED, BucketSecurityWarning.BucketIsNotEncrypted);
(0, utils_1.warnIfEquals)(props === null || props === void 0 ? void 0 : props.enforceSSL, false, BucketSecurityWarning.SSLIsNotEnforced);
(0, utils_1.warnIfEquals)(props === null || props === void 0 ? void 0 : props.publicReadAccess, true, BucketSecurityWarning.PublicReadAccessEnabled);
(0, utils_1.warnIfEquals)(props === null || props === void 0 ? void 0 : props.encryption, aws_s3_1.BucketEncryption.UNENCRYPTED, BucketSecurityWarning.BucketIsNotEncrypted);
super(scope, id, {

@@ -27,2 +27,2 @@ enforceSSL: true,

exports.SecureBucket = SecureBucket;
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiczMuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyJzMy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7QUFBQSw0Q0FBd0U7QUFHeEUsc0NBQTBDO0FBRTFDLElBQUsscUJBSUo7QUFKRCxXQUFLLHFCQUFxQjtJQUN4QiwrRUFBc0QsQ0FBQTtJQUN0RCx1R0FBOEUsQ0FBQTtJQUM5RSw2RUFBb0QsQ0FBQTtBQUN0RCxDQUFDLEVBSkkscUJBQXFCLEtBQXJCLHFCQUFxQixRQUl6QjtBQUVELE1BQWEsWUFBYSxTQUFRLGVBQU07SUFDdEMsWUFBWSxLQUFnQixFQUFFLEVBQVUsRUFBRSxLQUFtQjtRQUMzRCxvQkFBWSxDQUFDLEtBQUssYUFBTCxLQUFLLHVCQUFMLEtBQUssQ0FBRSxVQUFVLEVBQUUsS0FBSyxFQUFFLHFCQUFxQixDQUFDLGdCQUFnQixDQUFDLENBQUM7UUFDL0Usb0JBQVksQ0FBQyxLQUFLLGFBQUwsS0FBSyx1QkFBTCxLQUFLLENBQUUsZ0JBQWdCLEVBQUUsSUFBSSxFQUFFLHFCQUFxQixDQUFDLHVCQUF1QixDQUFDLENBQUM7UUFDM0Ysb0JBQVksQ0FBQyxLQUFLLGFBQUwsS0FBSyx1QkFBTCxLQUFLLENBQUUsVUFBVSxFQUFFLHlCQUFnQixDQUFDLFdBQVcsRUFBRSxxQkFBcUIsQ0FBQyxvQkFBb0IsQ0FBQyxDQUFDO1FBRTFHLEtBQUssQ0FBQyxLQU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jbGFzcyBTZWN1cmVCdWNrZXQgZXh0ZW5kcyBCdWNrZXQge1xuICBjb25zdHJ1Y3RvcihzY29wZTogQ29uc3RydWN0LCBpZDogc3RyaW5nLCBwcm9wcz86IEJ1Y2tldFByb3BzKSB7XG4gICAgd2FybklmRXF1YWxzKHByb3BzPy5lbmZvcmNlU1NMLCBmYWxzZSwgQnVja2V0U2VjdXJpdHlXYXJuaW5nLlNTTElzTm90RW5mb3JjZWQpO1xuICAgIHdhcm5JZkVxdWFscyhwcm9wcz8ucHVibGljUmVhZEFjY2VzcywgdHJ1ZSwgQnVja2V0U2VjdXJpdHlXYXJuaW5nLlB1YmxpY1JlYWRBY2Nlc3NFbmFibGVkKTtcbiAgICB3YXJuSWZFcXVhbHMocHJvcHM/LmVuY3J5cHRpb24sIEJ1Y2tldEVuY3J5cHRpb24uVU5FTkNSWVBURUQsIEJ1Y2tldFNlY3VyaXR5V2FybmluZy5CdWNrZXRJc05vdEVuY3J5cHRlZCk7XG5cbiAgICBzdXBlcihzY29wZSwgaWQsIHtcbiAgICAgIGVuZm9yY2VTU0w6IHRydWUsXG4gICAgICBwdWJsaWNSZWFkQWNjZXNzOiBmYWxzZSxcbiAgICAgIGVuY3J5cHRpb246IEJ1Y2tldEVuY3J5cHRpb24uUzNfTUFOQUdFRCxcbiAgICAgIC4uLnByb3BzXG4gICAgfSk7XG4gIH1cbn1cbiJdfQ==
export declare const warnIfEquals: (property: any, value: any, message: string) => void;
export declare const warnIfNotEquals: (property: any, value: any, message: string) => void;
export declare const warn: (message: string) => void;
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.warnIfNotEquals = exports.warnIfEquals = void 0;
exports.warn = exports.warnIfNotEquals = exports.warnIfEquals = void 0;
const CONSOLE_WARNING_COLOR = '\x1b[33m%s\x1b[0m';
const warnIfEquals = (property, value, message) => {
if (property === value) {
warn(message);
(0, exports.warn)(message);
}

@@ -13,3 +13,3 @@ };

if (property && property !== value) {
warn(message);
(0, exports.warn)(message);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UMsT0FBTyxDQUFDLENBQUM7S0FDZjtBQUNILENBQUMsQ0FBQztBQUpXLFFBQUEsZUFBZSxtQkFJMUI7QUFFSyxNQUFNLElBQUksR0FBRyxDQUFDLE9BQWUsRUFBUSxFQUFFO0lBQzVDLE9BQU8sQ0FBQyxJQUFJLENBQUMscUJBQXFCLEVBQUUsT0FBTyxPQUFPLEVBQUUsQ0FBQyxDQUFDO0FBQ3hELENBQUMsQ0FBQztBQUZXLFFBQUEsSUFBSSxRQUVmIiwic291cmNlc0NvbnRlbnQiOlsiY29uc3QgQ09OU09MRV9XQVJOSU5HX0NPTE9SID0gJ1xceDFiWzMzbSVzXFx4MWJbMG0nO1xuXG5leHBvcnQgY29uc3Qgd2FybklmRXF1YWxzID0gKHByb3BlcnR5OiBhbnksIHZhbHVlOiBhbnksIG1lc3NhZ2U6IHN0cmluZyk6IHZvaWQgPT4ge1xuICBpZiAocHJvcGVydHkgPT09IHZhbHVlKSB7XG4gICAgd2FybihtZXNzYWdlKTtcbiAgfVxufTtcblxuZXhwb3J0IGNvbnN0IHdhcm5JZk5vdEVxdWFscyA9IChwcm9wZXJ0eTogYW55LCB2YWx1ZTogYW55LCBtZXNzYWdlOiBzdHJpbmcpOiB2b2lkID0+IHtcbiAgaWYgKHByb3BlcnR5ICYmIHByb3BlcnR5ICE9PSB2YWx1ZSkge1xuICAgIHdhcm4obWVzc2FnZSk7XG4gIH1cbn07XG5cbmV4cG9ydCBjb25zdCB3YXJuID0gKG1lc3NhZ2U6IHN0cmluZyk6IHZvaWQgPT4ge1xuICBjb25zb2xlLndhcm4oQ09OU09MRV9XQVJOSU5HX0NPTE9SLCBgIyMjICR7bWVzc2FnZX1gKTtcbn07XG4iXX0=
{
"name": "secure-cdk",
"version": "0.1.9",
"version": "0.1.10-alpha.0",
"description": "Security abstraction for AWS CDK library. Create AWS resources with best security practices applied for you.",

@@ -10,3 +10,4 @@ "keywords": [

"CloudFront",
"Security"
"Security",
"IAM"
],

@@ -25,9 +26,2 @@ "author": {

"license": "MIT",
"devDependencies": {
"@types/node": "^16.4.12",
"commitizen": "^4.2.4",
"cz-conventional-changelog": "^3.3.0",
"standard-version": "^9.3.1",
"typescript": "^4.3.5"
},
"main": "./lib/services/index.js",

@@ -46,6 +40,18 @@ "files": [

"peerDependencies": {
"@aws-cdk/aws-s3": "^1.117.0",
"@aws-cdk/aws-cloudfront": "^1.117.0",
"@aws-cdk/core": "^1.117.0"
"@aws-cdk/aws-s3": "^1.119.0",
"@aws-cdk/aws-cloudfront": "^1.119.0",
"@aws-cdk/aws-iam": "^1.119.0",
"@aws-cdk/core": "^1.119.0"
},
"devDependencies": {
"@aws-cdk/aws-s3": "1.119.0",
"@aws-cdk/aws-cloudfront": "1.119.0",
"@aws-cdk/aws-iam": "1.119.0",
"@aws-cdk/core": "1.119.0",
"@types/node": "^16.4.12",
"commitizen": "^4.2.4",
"cz-conventional-changelog": "^3.3.0",
"standard-version": "^9.3.1",
"typescript": "^4.3.5"
}
}

@@ -8,5 +8,5 @@ # Security abstraction for AWS CDK library. Create AWS resources with best security practices applied for you.

The purpose of this package is to enforce best security practices for `AWS` services. It uses `AWS CDK` under the hood to create resources and won't without it.
The purpose of this package is to enforce best security practices for `AWS` services. It uses `AWS CDK` under the hood to create resources and won't work without it.
You may find that some of the rules are too strict for your use cases, but you always have a possibility be explicitly overriding them. If you do that, you will get a warning that will remind you about the security violations.
You may find that some of the rules are too strict for your use cases, but you always have a possibility of explicitly overriding them. If you do that, you will get a warning that will remind you about the security violations.

@@ -36,3 +36,3 @@ ## Installation

const mySiteBucket = new SecureBucket(this, 'myBucket', {
const mySiteBucket = new SecureBucket(this, 'my-bucket', {
bucketName: 'my-bucket-name',

@@ -62,3 +62,3 @@ websiteIndexDocument: 'index.html'

const mySiteBucket = new SecureDistribution(this, 'myDistribution', {
const distribution = new SecureDistribution(this, 'my-distribution', {
defaultBehavior: createSecureBehavior({

@@ -70,1 +70,29 @@ origin: new S3Origin(mySiteBucket)

```
### IAM Role (PolicyStatement)
Security wrapper for `PolicyStatement` construct. Does not set default properties, however warns when:
- `*` passed in `actions` property;
- `<resource>:*` passed in `actions` property;
- `*` passed in `resources` property;
```typescript
import { Effect } from '@aws-cdk/aws-iam';
import { SecurePolicyStatement } from 'secure-cdk';
const policyStatement = new SecurePolicyStatement(this, 'my-policy-statement', {
actions: [`cloudfront:*`],
resources: [`*`],
effect: Effect.ALLOW
});
```
## TODO
- [ ] Alternative automatic checker (extensions of a `Stack`);
- [ ] Centralized warning system to awoid warning duplication;
- [ ] Inclusion of resource identifier in warning;
- [ ] Handle `.addActions` for `SecurePolicyStatement`;
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc