Skip to content

Commit 406d053

Browse files
authored
chore: add GitHub Actions workflow check for copyright header and fix missing copyright headers (#341)
* chore: add workflow to check for copyright notices * chore: add missing copyright notices
1 parent 9c2f26c commit 406d053

File tree

24 files changed

+93
-15
lines changed

24 files changed

+93
-15
lines changed

.github/not-grep.toml

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
[include]
2+
# Use "include" rather than "prefix" because
3+
# some CLI entry point files have shebang lines
4+
# that need to come first.
5+
"**/*.ts" = """
6+
// Copyright Amazon.com Inc. or its affiliates. All Rights Reserved.
7+
// SPDX-License-Identifier: Apache-2.0
8+
"""
9+
"**/package.json" = "\"license\": \"Apache-2.0\""
10+
"**/*.sh" = """
11+
# Copyright Amazon.com Inc. or its affiliates. All Rights Reserved.
12+
# SPDX-License-Identifier: Apache-2.0
13+
"""
14+
[prefix]
15+
# Exclude the copies of msrcrypto included in examples packages.
16+
"**/[!msrcrypto]*.js" = """
17+
// Copyright Amazon.com Inc. or its affiliates. All Rights Reserved.
18+
// SPDX-License-Identifier: Apache-2.0
19+
"""
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
# This workflow performs static analysis checks.
2+
name: static analysis
3+
4+
on: ["pull_request", "push"]
5+
6+
jobs:
7+
not-grep:
8+
runs-on: ubuntu-latest
9+
steps:
10+
- uses: actions/checkout@v2
11+
- name: not-grep
12+
uses: mattsb42-meta/[email protected]

karma.conf.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
// Copyright Amazon.com Inc. or its affiliates. All Rights Reserved.
2+
// SPDX-License-Identifier: Apache-2.0
3+
14
// Karma configuration
25

36
module.exports = function (config) {

modules/caching-materials-manager-browser/karma.conf.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
// Copyright Amazon.com Inc. or its affiliates. All Rights Reserved.
2+
// SPDX-License-Identifier: Apache-2.0
3+
14
// Karma configuration
25

36
module.exports = function (config) {

modules/decrypt-browser/karma.conf.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
// Copyright Amazon.com Inc. or its affiliates. All Rights Reserved.
2+
// SPDX-License-Identifier: Apache-2.0
3+
14
// Karma configuration
25

36
module.exports = function (config) {

modules/encrypt-browser/karma.conf.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
// Copyright Amazon.com Inc. or its affiliates. All Rights Reserved.
2+
// SPDX-License-Identifier: Apache-2.0
3+
14
// Karma configuration
25

36
module.exports = function (config) {

modules/encrypt-node/src/encrypt.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
// Copyright Amazon.com Inc. or its affiliates. All Rights Reserved.
2+
// SPDX-License-Identifier: Apache-2.0
3+
14
import {
25
KeyringNode,
36
NodeMaterialsManager,

modules/example-browser/karma.conf.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
// Copyright Amazon.com Inc. or its affiliates. All Rights Reserved.
2+
// SPDX-License-Identifier: Apache-2.0
3+
14
const webpack = require('webpack')
25
const {defaultProvider} = require('@aws-sdk/credential-provider-node')
36

modules/example-browser/webpack_configs/aes.webpack.config.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
// Copyright Amazon.com Inc. or its affiliates. All Rights Reserved.
2+
// SPDX-License-Identifier: Apache-2.0
3+
14
const path = require('path')
25

36
module.exports = {

modules/example-browser/webpack_configs/caching_cmm.webpack.config.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
// Copyright Amazon.com Inc. or its affiliates. All Rights Reserved.
2+
// SPDX-License-Identifier: Apache-2.0
3+
14
const webpack = require('webpack')
25
const path = require('path')
36
const {defaultProvider} = require('@aws-sdk/credential-provider-node')

modules/example-browser/webpack_configs/fallback.webpack.config.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
// Copyright Amazon.com Inc. or its affiliates. All Rights Reserved.
2+
// SPDX-License-Identifier: Apache-2.0
3+
14
const path = require('path')
25

36
module.exports = {

modules/example-browser/webpack_configs/kms.webpack.config.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
// Copyright Amazon.com Inc. or its affiliates. All Rights Reserved.
2+
// SPDX-License-Identifier: Apache-2.0
3+
14
const webpack = require('webpack')
25
const path = require('path')
36
const {defaultProvider} = require('@aws-sdk/credential-provider-node')

modules/example-browser/webpack_configs/multi_keyring.webpack.config.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
// Copyright Amazon.com Inc. or its affiliates. All Rights Reserved.
2+
// SPDX-License-Identifier: Apache-2.0
3+
14
const webpack = require('webpack')
25
const path = require('path')
36
const {defaultProvider} = require('@aws-sdk/credential-provider-node')

modules/example-browser/webpack_configs/rsa.webpack.config.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
// Copyright Amazon.com Inc. or its affiliates. All Rights Reserved.
2+
// SPDX-License-Identifier: Apache-2.0
3+
14
const path = require('path')
25

36
module.exports = {

modules/integration-browser/karma.conf.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
// Copyright Amazon.com Inc. or its affiliates. All Rights Reserved.
2+
// SPDX-License-Identifier: Apache-2.0
3+
14
// Karma configuration
25
const { readFileSync } = require('fs')
36

modules/integration-browser/webpack.config.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
// Copyright Amazon.com Inc. or its affiliates. All Rights Reserved.
2+
// SPDX-License-Identifier: Apache-2.0
3+
14
const path = require('path')
25

36
module.exports = {

modules/kms-keyring-browser/karma.conf.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
// Copyright Amazon.com Inc. or its affiliates. All Rights Reserved.
2+
// SPDX-License-Identifier: Apache-2.0
3+
14
// Karma configuration
25

36
module.exports = function (config) {

modules/material-management-browser/karma.conf.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
// Copyright Amazon.com Inc. or its affiliates. All Rights Reserved.
2+
// SPDX-License-Identifier: Apache-2.0
3+
14
// Karma configuration
25

36
module.exports = function (config) {

modules/raw-aes-keyring-browser/karma.conf.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
// Copyright Amazon.com Inc. or its affiliates. All Rights Reserved.
2+
// SPDX-License-Identifier: Apache-2.0
3+
14
// Karma configuration
25

36
module.exports = function (config) {

modules/raw-rsa-keyring-browser/karma.conf.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
// Copyright Amazon.com Inc. or its affiliates. All Rights Reserved.
2+
// SPDX-License-Identifier: Apache-2.0
3+
14
// Karma configuration
25

36
module.exports = function (config) {

modules/raw-rsa-keyring-node/src/oaep_hash_supported.ts

Lines changed: 2 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,5 @@
1-
/*
2-
* Copyright 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved.
3-
*
4-
* Licensed under the Apache License, Version 2.0 (the "License"). You may not use
5-
* this file except in compliance with the License. A copy of the License is
6-
* located at
7-
*
8-
* http://aws.amazon.com/apache2.0/
9-
*
10-
* or in the "license" file accompanying this file. This file is distributed on an
11-
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
12-
* implied. See the License for the specific language governing permissions and
13-
* limitations under the License.
14-
*/
1+
// Copyright Amazon.com Inc. or its affiliates. All Rights Reserved.
2+
// SPDX-License-Identifier: Apache-2.0
153

164
/* oaepHash support was added in Node.js v12.9.1 (https://github.com/nodejs/node/pull/28335)
175
* However, the integration tests need to be able to verify functionality on other versions.

modules/web-crypto-backend/karma.conf.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
// Copyright Amazon.com Inc. or its affiliates. All Rights Reserved.
2+
// SPDX-License-Identifier: Apache-2.0
3+
14
// Karma configuration
25

36
module.exports = function (config) {

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@
5757
"url": "[email protected]:awslabs/aws-encryption-sdk-javascript.git"
5858
},
5959
"author": "[email protected]",
60-
"license": "UNLICENSED",
60+
"license": "Apache-2.0",
6161
"dependencies": {
6262
"@aws-crypto/cache-material": "file:modules/cache-material",
6363
"@aws-crypto/caching-materials-manager-browser": "file:modules/caching-materials-manager-browser",

wallaby.conf.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
// Copyright Amazon.com Inc. or its affiliates. All Rights Reserved.
2+
// SPDX-License-Identifier: Apache-2.0
13

24
const compilerOptions = Object.assign({
35
'esModuleInterop': true,

0 commit comments

Comments
 (0)