Skip to content

chore: add GitHub Actions workflow check for copyright header and fix missing copyright headers #341

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
May 19, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 19 additions & 0 deletions .github/not-grep.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
[include]
# Use "include" rather than "prefix" because
# some CLI entry point files have shebang lines
# that need to come first.
"**/*.ts" = """
// Copyright Amazon.com Inc. or its affiliates. All Rights Reserved.
// SPDX-License-Identifier: Apache-2.0
"""
"**/package.json" = "\"license\": \"Apache-2.0\""
"**/*.sh" = """
# Copyright Amazon.com Inc. or its affiliates. All Rights Reserved.
# SPDX-License-Identifier: Apache-2.0
"""
[prefix]
# Exclude the copies of msrcrypto included in examples packages.
"**/[!msrcrypto]*.js" = """
// Copyright Amazon.com Inc. or its affiliates. All Rights Reserved.
// SPDX-License-Identifier: Apache-2.0
"""
12 changes: 12 additions & 0 deletions .github/workflows/ci_static-analysis.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# This workflow performs static analysis checks.
name: static analysis

on: ["pull_request", "push"]

jobs:
not-grep:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: not-grep
uses: mattsb42-meta/not-grep@1.0.0
3 changes: 3 additions & 0 deletions karma.conf.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
// Copyright Amazon.com Inc. or its affiliates. All Rights Reserved.
// SPDX-License-Identifier: Apache-2.0

// Karma configuration

module.exports = function (config) {
Expand Down
3 changes: 3 additions & 0 deletions modules/caching-materials-manager-browser/karma.conf.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
// Copyright Amazon.com Inc. or its affiliates. All Rights Reserved.
// SPDX-License-Identifier: Apache-2.0

// Karma configuration

module.exports = function (config) {
Expand Down
3 changes: 3 additions & 0 deletions modules/decrypt-browser/karma.conf.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
// Copyright Amazon.com Inc. or its affiliates. All Rights Reserved.
// SPDX-License-Identifier: Apache-2.0

// Karma configuration

module.exports = function (config) {
Expand Down
3 changes: 3 additions & 0 deletions modules/encrypt-browser/karma.conf.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
// Copyright Amazon.com Inc. or its affiliates. All Rights Reserved.
// SPDX-License-Identifier: Apache-2.0

// Karma configuration

module.exports = function (config) {
Expand Down
3 changes: 3 additions & 0 deletions modules/encrypt-node/src/encrypt.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
// Copyright Amazon.com Inc. or its affiliates. All Rights Reserved.
// SPDX-License-Identifier: Apache-2.0

import {
KeyringNode,
NodeMaterialsManager,
Expand Down
3 changes: 3 additions & 0 deletions modules/example-browser/karma.conf.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
// Copyright Amazon.com Inc. or its affiliates. All Rights Reserved.
// SPDX-License-Identifier: Apache-2.0

const webpack = require('webpack')
const {defaultProvider} = require('@aws-sdk/credential-provider-node')

Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
// Copyright Amazon.com Inc. or its affiliates. All Rights Reserved.
// SPDX-License-Identifier: Apache-2.0

const path = require('path')

module.exports = {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
// Copyright Amazon.com Inc. or its affiliates. All Rights Reserved.
// SPDX-License-Identifier: Apache-2.0

const webpack = require('webpack')
const path = require('path')
const {defaultProvider} = require('@aws-sdk/credential-provider-node')
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
// Copyright Amazon.com Inc. or its affiliates. All Rights Reserved.
// SPDX-License-Identifier: Apache-2.0

const path = require('path')

module.exports = {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
// Copyright Amazon.com Inc. or its affiliates. All Rights Reserved.
// SPDX-License-Identifier: Apache-2.0

const webpack = require('webpack')
const path = require('path')
const {defaultProvider} = require('@aws-sdk/credential-provider-node')
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
// Copyright Amazon.com Inc. or its affiliates. All Rights Reserved.
// SPDX-License-Identifier: Apache-2.0

const webpack = require('webpack')
const path = require('path')
const {defaultProvider} = require('@aws-sdk/credential-provider-node')
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
// Copyright Amazon.com Inc. or its affiliates. All Rights Reserved.
// SPDX-License-Identifier: Apache-2.0

const path = require('path')

module.exports = {
Expand Down
3 changes: 3 additions & 0 deletions modules/integration-browser/karma.conf.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
// Copyright Amazon.com Inc. or its affiliates. All Rights Reserved.
// SPDX-License-Identifier: Apache-2.0

// Karma configuration
const { readFileSync } = require('fs')

Expand Down
3 changes: 3 additions & 0 deletions modules/integration-browser/webpack.config.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
// Copyright Amazon.com Inc. or its affiliates. All Rights Reserved.
// SPDX-License-Identifier: Apache-2.0

const path = require('path')

module.exports = {
Expand Down
3 changes: 3 additions & 0 deletions modules/kms-keyring-browser/karma.conf.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
// Copyright Amazon.com Inc. or its affiliates. All Rights Reserved.
// SPDX-License-Identifier: Apache-2.0

// Karma configuration

module.exports = function (config) {
Expand Down
3 changes: 3 additions & 0 deletions modules/material-management-browser/karma.conf.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
// Copyright Amazon.com Inc. or its affiliates. All Rights Reserved.
// SPDX-License-Identifier: Apache-2.0

// Karma configuration

module.exports = function (config) {
Expand Down
3 changes: 3 additions & 0 deletions modules/raw-aes-keyring-browser/karma.conf.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
// Copyright Amazon.com Inc. or its affiliates. All Rights Reserved.
// SPDX-License-Identifier: Apache-2.0

// Karma configuration

module.exports = function (config) {
Expand Down
3 changes: 3 additions & 0 deletions modules/raw-rsa-keyring-browser/karma.conf.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
// Copyright Amazon.com Inc. or its affiliates. All Rights Reserved.
// SPDX-License-Identifier: Apache-2.0

// Karma configuration

module.exports = function (config) {
Expand Down
16 changes: 2 additions & 14 deletions modules/raw-rsa-keyring-node/src/oaep_hash_supported.ts
Original file line number Diff line number Diff line change
@@ -1,17 +1,5 @@
/*
* Copyright 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License"). You may not use
* this file except in compliance with the License. A copy of the License is
* located at
*
* http://aws.amazon.com/apache2.0/
*
* or in the "license" file accompanying this file. This file is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
* implied. See the License for the specific language governing permissions and
* limitations under the License.
*/
// Copyright Amazon.com Inc. or its affiliates. All Rights Reserved.
// SPDX-License-Identifier: Apache-2.0

/* oaepHash support was added in Node.js v12.9.1 (https://github.com/nodejs/node/pull/28335)
* However, the integration tests need to be able to verify functionality on other versions.
Expand Down
3 changes: 3 additions & 0 deletions modules/web-crypto-backend/karma.conf.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
// Copyright Amazon.com Inc. or its affiliates. All Rights Reserved.
// SPDX-License-Identifier: Apache-2.0

// Karma configuration

module.exports = function (config) {
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@
"url": "git@github.com:awslabs/aws-encryption-sdk-javascript.git"
},
"author": "aws-crypto-tools-team@amazon.com",
"license": "UNLICENSED",
"license": "Apache-2.0",
"dependencies": {
"@aws-crypto/cache-material": "file:modules/cache-material",
"@aws-crypto/caching-materials-manager-browser": "file:modules/caching-materials-manager-browser",
Expand Down
2 changes: 2 additions & 0 deletions wallaby.conf.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// Copyright Amazon.com Inc. or its affiliates. All Rights Reserved.
// SPDX-License-Identifier: Apache-2.0

const compilerOptions = Object.assign({
'esModuleInterop': true,
Expand Down