Skip to content

Commit

Permalink
feat: improved transparency for license generation (#82)
Browse files Browse the repository at this point in the history
* feat: improved transparency for license generation

* fix: including some missed files
  • Loading branch information
gyalai-aws authored Aug 22, 2024
1 parent 8459093 commit 2c54a3b
Show file tree
Hide file tree
Showing 25 changed files with 1,829 additions and 1,826 deletions.
1 change: 1 addition & 0 deletions .projenrc.ts
Original file line number Diff line number Diff line change
Expand Up @@ -191,6 +191,7 @@ const cli = new yarn.TypeScriptWorkspace({
'csv',
'@aws-sdk/client-s3',
'@aws-sdk/credential-providers',
'tslog',
],
jest: false,
});
Expand Down
650 changes: 253 additions & 397 deletions NOTICE

Large diffs are not rendered by default.

6 changes: 1 addition & 5 deletions OSS_License_Summary.csv
Original file line number Diff line number Diff line change
Expand Up @@ -6,16 +6,12 @@
"(MIT OR CC0-1.0)","2"
"(MIT OR GPL-3.0-or-later)","1"
"0BSD","2"
<<<<<<< Updated upstream
"Apache-2.0","140"
=======
"Apache-2.0","141"
>>>>>>> Stashed changes
"BSD-2-Clause","12"
"BSD-3-Clause","21"
"CC-BY-4.0","1"
"CC0-1.0","1"
"ISC","60"
"MIT","560"
"MIT","562"
"Python-2.0","1"
"UNLICENSED","1"
10 changes: 5 additions & 5 deletions package-verification.json
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
{
"license": {
"package.json": "51868e88ee6cefb80f796c05a19b5c8364269222e343d12dc5bbe7b7d493855d",
"package.json": "2fa6e73426cf7478f18abdad18c34aab0e7cc00a9c7be587a820772228ccb927",
"samples/cdk-ts-example/package.json": "54e2441af495ddf02e1e232fdd1ed4edc697c31fe03671776290a254e52ba2a6",
"packages/@cdklabs/cdk-cicd-wrapper/package.json": "c3289673d7e0b5f21ddc7913c3ad55c9424c286746f7ded136949f14a2cf2045",
"packages/@cdklabs/cdk-cicd-wrapper-cli/package.json": "0019772cf047d53197bc9e0068506eacdb240d7645c51068dbe0798c626ec0c5",
"packages/@cdklabs/cdk-cicd-wrapper-projen/package.json": "62eb28c35af3481a120c1a077ae0315d19b6227e5b99c85dfacce16c52cda162",
"packages/@cdklabs/cdk-cicd-wrapper/package.json": "5a037128d50a11a17cfddff266a40b2c939001931e30c27a2e0ad4cf8052186b",
"packages/@cdklabs/cdk-cicd-wrapper-cli/package.json": "56ad46900253b2fd1c44d965bdb0c40975ef5035dccff7be73c4864ccba8f57b",
"packages/@cdklabs/cdk-cicd-wrapper-projen/package.json": "8d45188ba2b0e57ba00df30f1cc2931032353a42c2da1171a708fb339b719b98",
"projectList": "5790138ec76401840b75a0409a66d8e7e10445628567d18dbe5b2feedd20f463"
},
"npm-lock-file": "d5248d614fdd6f39e583d3a529bae3591f8806df19a71797febdc37b1147032e"
"npm-lock-file": "82fb1f31cffe273ba4518672883ce4ee7559edf92c0c9a81b64029d9ce106c8e"
}
8 changes: 4 additions & 4 deletions package.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 4 additions & 0 deletions packages/@cdklabs/cdk-cicd-wrapper-cli/.projen/deps.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions packages/@cdklabs/cdk-cicd-wrapper-cli/.projen/tasks.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

11 changes: 6 additions & 5 deletions packages/@cdklabs/cdk-cicd-wrapper-cli/package.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
import { spawnSync } from 'child_process';
import * as path from 'path';
import * as yargs from 'yargs';
import { logger } from '../utils/Logging';

/**
* The path to the Python dependency check script.
Expand Down Expand Up @@ -54,7 +55,7 @@ class Command implements yargs.CommandModule {
*/
handler(args: yargs.Arguments) {
if (args.python) {
console.log('Checking Python dependencies');
logger.info('Checking Python dependencies');
const command = path.join(__dirname, CHECK_DEPENDENCIES_PYTHON);

const result = spawnSync(command, { stdio: 'inherit' });
Expand All @@ -65,7 +66,7 @@ class Command implements yargs.CommandModule {
}

if (args.npm) {
console.log('Checking NPM dependencies');
logger.info('Checking NPM dependencies');

const result = spawnSync(
'npx',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import * as path from 'path';
import { S3, BucketLocationConstraint } from '@aws-sdk/client-s3';
import { fromNodeProviderChain } from '@aws-sdk/credential-providers';
import * as yargs from 'yargs';
import { logger } from '../utils/Logging';

/**
* The default path to the policy JSON file.
Expand Down Expand Up @@ -92,7 +93,7 @@ class Command implements yargs.CommandModule {
credentials: fromNodeProviderChain({ profile: profile }),
});

console.log(`Creating bucket ${bucketName}...`);
logger.info(`Creating bucket ${bucketName}...`);
try {
await s3client.createBucket({
Bucket: bucketName,
Expand All @@ -101,20 +102,20 @@ class Command implements yargs.CommandModule {
},
});

console.log(`Bucket ${bucketName} has been created.`);
logger.info(`Bucket ${bucketName} has been created.`);

console.log('Set bucket policy.');
logger.info('Set bucket policy.');
s3client.putBucketPolicy(
{
Bucket: bucketName,
Policy: policyString,
},
(err) => {
if (err) console.log(err, err.stack);
if (err) logger.error(err, err.stack);
},
);

console.log('Disable public access.');
logger.info('Disable public access.');
await s3client.putPublicAccessBlock({
Bucket: bucketName,
PublicAccessBlockConfiguration: {
Expand All @@ -125,7 +126,7 @@ class Command implements yargs.CommandModule {
},
});
} catch (err) {
console.error(err);
logger.error(err);
}
})();
}
Expand Down
Loading

0 comments on commit 2c54a3b

Please sign in to comment.