From ed744acf2db6ee65d46e1d617f19e4c73d245c65 Mon Sep 17 00:00:00 2001 From: Norbert Schneider Date: Tue, 1 Aug 2023 10:36:29 +0200 Subject: [PATCH] Add eslint header plugin This plugin automatically checks the existence of correct copyright header and adds them via the `fix` command. --- .eslintrc.json | 4 +- .header.js | 15 +++++ .../command-injection/custom-hooks.js | 2 - .../prototype-pollution/config.js | 17 ++++- examples/custom-hooks/custom-hooks.js | 4 +- examples/custom-hooks/fuzz.js | 16 +++++ examples/jest_integration/integration.fuzz.js | 2 +- examples/jest_integration/integration.test.js | 2 +- examples/jest_integration/target.js | 2 +- examples/jest_integration/worker.fuzz.js | 2 +- .../workerGoldenReference.test.js | 2 +- .../jest.config.ts | 16 +++++ examples/jpeg/fuzz.js | 16 +++++ examples/jpeg_es6/fuzz.js | 16 +++++ examples/js-yaml/fuzz.ts | 2 +- examples/maze/fuzz.js | 2 +- examples/protobufjs/fuzz.js | 16 +++++ examples/spectral/spectral-example.js | 2 +- examples/xml/fuzz.js | 16 +++++ fuzztests/runFuzzTests.js | 15 +++++ jest.config.js | 2 +- package-lock.json | 17 +++++ package.json | 1 + packages/core/FuzzedDataProvider.test.ts | 2 +- packages/core/FuzzedDataProvider.ts | 2 +- packages/core/cli.ts | 2 +- packages/core/finding.ts | 1 - packages/core/options.ts | 1 - packages/fuzzer/fuzzer.test.ts | 2 +- packages/fuzzer/fuzzer.ts | 2 +- packages/hooking/hook.ts | 2 +- packages/hooking/index.ts | 2 +- packages/instrumentor/instrument.test.ts | 2 +- .../instrumentor/plugins/codeCoverage.test.ts | 2 +- packages/instrumentor/plugins/codeCoverage.ts | 2 +- .../instrumentor/plugins/compareHooks.test.ts | 2 +- packages/instrumentor/plugins/compareHooks.ts | 2 +- .../plugins/functionHooks.test.ts | 2 +- .../instrumentor/plugins/functionHooks.ts | 2 +- packages/instrumentor/plugins/helpers.ts | 16 +++++ packages/instrumentor/plugins/testhelpers.ts | 2 +- packages/jest-runner/config.test.ts | 2 +- packages/jest-runner/config.ts | 2 +- packages/jest-runner/corpus.test.ts | 2 +- packages/jest-runner/corpus.ts | 2 +- packages/jest-runner/errorUtils.test.ts | 2 +- packages/jest-runner/errorUtils.ts | 2 +- packages/jest-runner/fuzz.test.ts | 2 +- packages/jest-runner/fuzz.ts | 2 +- packages/jest-runner/index.ts | 2 +- packages/jest-runner/worker.ts | 2 +- .../command-injection/makeFRIENDLY.js | 16 +++++ .../sample_fuzz_test/custom-hooks.js | 16 +++++ .../fuzz+lib+codeCoverage-fuzz.json | 40 ++++++------ .../fuzz+lib+customHooks.json | 62 +++++++++---------- .../fuzz+lib+otherCodeCoverage-fuzz.json | 40 ++++++------ .../expected_coverage/fuzz+lib.json | 40 ++++++------ tests/code_coverage/sample_fuzz_test/fuzz.js | 2 +- tests/code_coverage/sample_fuzz_test/lib.js | 16 +++++ tests/done_callback/fuzz.js | 2 +- tests/promise/fuzz.js | 2 +- tests/return_values/exampleCode/code.js | 16 +++++ tests/string_compare/fuzz.js | 2 +- tests/switch/fuzz.js | 2 +- tests/timeout/fuzz.js | 2 +- tests/value_profiling/fuzz.js | 2 +- 66 files changed, 376 insertions(+), 141 deletions(-) create mode 100644 .header.js diff --git a/.eslintrc.json b/.eslintrc.json index 1a32858b8..2872fbf6a 100644 --- a/.eslintrc.json +++ b/.eslintrc.json @@ -14,10 +14,12 @@ "overrides": [ { "files": ["*.js", "*.ts"], + "plugins": ["header"], "rules": { "@typescript-eslint/no-var-requires": "off", "@typescript-eslint/ban-ts-comment": "off", - "@typescript-eslint/no-unused-vars": "off" + "@typescript-eslint/no-unused-vars": "off", + "header/header": [2, ".header.js"] } }, { diff --git a/.header.js b/.header.js new file mode 100644 index 000000000..9e56edef6 --- /dev/null +++ b/.header.js @@ -0,0 +1,15 @@ +/* + * Copyright 2023 Code Intelligence GmbH + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License 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. + */ diff --git a/examples/bug-detectors/command-injection/custom-hooks.js b/examples/bug-detectors/command-injection/custom-hooks.js index 8893acc6b..a777589cb 100644 --- a/examples/bug-detectors/command-injection/custom-hooks.js +++ b/examples/bug-detectors/command-injection/custom-hooks.js @@ -12,8 +12,6 @@ * 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. - * - * Examples showcasing the custom hooks API */ const { registerReplaceHook } = require("@jazzer.js/hooking"); diff --git a/examples/bug-detectors/prototype-pollution/config.js b/examples/bug-detectors/prototype-pollution/config.js index dae63b2c9..5fd55c057 100644 --- a/examples/bug-detectors/prototype-pollution/config.js +++ b/examples/bug-detectors/prototype-pollution/config.js @@ -1,4 +1,19 @@ -// eslint-disable-next-line @typescript-eslint/no-var-requires +/* + * Copyright 2023 Code Intelligence GmbH + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License 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. + */ + const { getBugDetectorConfiguration, // eslint-disable-next-line @typescript-eslint/no-var-requires diff --git a/examples/custom-hooks/custom-hooks.js b/examples/custom-hooks/custom-hooks.js index 234673062..77f0d51bf 100644 --- a/examples/custom-hooks/custom-hooks.js +++ b/examples/custom-hooks/custom-hooks.js @@ -1,5 +1,5 @@ /* - * Copyright 2022 Code Intelligence GmbH + * Copyright 2023 Code Intelligence GmbH * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -12,8 +12,6 @@ * 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. - * - * Examples showcasing the custom hooks API */ const { diff --git a/examples/custom-hooks/fuzz.js b/examples/custom-hooks/fuzz.js index bbfcd2856..8155489cb 100644 --- a/examples/custom-hooks/fuzz.js +++ b/examples/custom-hooks/fuzz.js @@ -1,3 +1,19 @@ +/* + * Copyright 2023 Code Intelligence GmbH + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License 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. + */ + // The code in this file is based on the examples available in JSFuzz: // https://gitlab.com/gitlab-org/security-products/analyzers/fuzzers/jsfuzz/-/blob/34a694a8c73bfe0895c4e24784ba5b6dfe964b94/examples/jpeg/fuzz.js // The original code is available under the Apache License 2.0. diff --git a/examples/jest_integration/integration.fuzz.js b/examples/jest_integration/integration.fuzz.js index 19cd405d8..97bdb45dc 100644 --- a/examples/jest_integration/integration.fuzz.js +++ b/examples/jest_integration/integration.fuzz.js @@ -1,5 +1,5 @@ /* - * Copyright 2022 Code Intelligence GmbH + * Copyright 2023 Code Intelligence GmbH * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/examples/jest_integration/integration.test.js b/examples/jest_integration/integration.test.js index e95e347fe..2b7f5e9c2 100644 --- a/examples/jest_integration/integration.test.js +++ b/examples/jest_integration/integration.test.js @@ -1,5 +1,5 @@ /* - * Copyright 2022 Code Intelligence GmbH + * Copyright 2023 Code Intelligence GmbH * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/examples/jest_integration/target.js b/examples/jest_integration/target.js index df60110cd..3413eaf8d 100644 --- a/examples/jest_integration/target.js +++ b/examples/jest_integration/target.js @@ -1,5 +1,5 @@ /* - * Copyright 2022 Code Intelligence GmbH + * Copyright 2023 Code Intelligence GmbH * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/examples/jest_integration/worker.fuzz.js b/examples/jest_integration/worker.fuzz.js index 72329f208..e95c2f425 100644 --- a/examples/jest_integration/worker.fuzz.js +++ b/examples/jest_integration/worker.fuzz.js @@ -1,5 +1,5 @@ /* - * Copyright 2022 Code Intelligence GmbH + * Copyright 2023 Code Intelligence GmbH * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/examples/jest_integration/workerGoldenReference.test.js b/examples/jest_integration/workerGoldenReference.test.js index 9ea52d42f..e24a84400 100644 --- a/examples/jest_integration/workerGoldenReference.test.js +++ b/examples/jest_integration/workerGoldenReference.test.js @@ -1,5 +1,5 @@ /* - * Copyright 2022 Code Intelligence GmbH + * Copyright 2023 Code Intelligence GmbH * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/examples/jest_typescript_integration/jest.config.ts b/examples/jest_typescript_integration/jest.config.ts index 55b2597f6..e8b6272b1 100644 --- a/examples/jest_typescript_integration/jest.config.ts +++ b/examples/jest_typescript_integration/jest.config.ts @@ -1,3 +1,19 @@ +/* + * Copyright 2023 Code Intelligence GmbH + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License 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. + */ + import type { Config } from "jest"; const config: Config = { diff --git a/examples/jpeg/fuzz.js b/examples/jpeg/fuzz.js index ef0f7f527..6cea6bd4d 100644 --- a/examples/jpeg/fuzz.js +++ b/examples/jpeg/fuzz.js @@ -1,3 +1,19 @@ +/* + * Copyright 2023 Code Intelligence GmbH + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License 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. + */ + // The code in this file is based on the examples available in JSFuzz: // https://gitlab.com/gitlab-org/security-products/analyzers/fuzzers/jsfuzz/-/blob/34a694a8c73bfe0895c4e24784ba5b6dfe964b94/examples/jpeg/fuzz.js // The original code is available under the Apache License 2.0. diff --git a/examples/jpeg_es6/fuzz.js b/examples/jpeg_es6/fuzz.js index 3833d6186..896d0a8b7 100644 --- a/examples/jpeg_es6/fuzz.js +++ b/examples/jpeg_es6/fuzz.js @@ -1,3 +1,19 @@ +/* + * Copyright 2023 Code Intelligence GmbH + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License 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. + */ + // The code in this file is based on the examples available in JSFuzz: // https://gitlab.com/gitlab-org/security-products/analyzers/fuzzers/jsfuzz/-/blob/34a694a8c73bfe0895c4e24784ba5b6dfe964b94/examples/jpeg/fuzz.js // The original code is available under the Apache License 2.0. diff --git a/examples/js-yaml/fuzz.ts b/examples/js-yaml/fuzz.ts index 5f735a1d9..5c32ebbb1 100644 --- a/examples/js-yaml/fuzz.ts +++ b/examples/js-yaml/fuzz.ts @@ -1,5 +1,5 @@ /* - * Copyright 2022 Code Intelligence GmbH + * Copyright 2023 Code Intelligence GmbH * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/examples/maze/fuzz.js b/examples/maze/fuzz.js index 1bbf3c024..1306ade50 100644 --- a/examples/maze/fuzz.js +++ b/examples/maze/fuzz.js @@ -1,5 +1,5 @@ /* - * Copyright 2022 Code Intelligence GmbH + * Copyright 2023 Code Intelligence GmbH * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/examples/protobufjs/fuzz.js b/examples/protobufjs/fuzz.js index f1f4aeab7..d4af5174a 100644 --- a/examples/protobufjs/fuzz.js +++ b/examples/protobufjs/fuzz.js @@ -1,3 +1,19 @@ +/* + * Copyright 2023 Code Intelligence GmbH + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License 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. + */ + import proto from "protobufjs"; import { temporaryWriteSync } from "tempy"; diff --git a/examples/spectral/spectral-example.js b/examples/spectral/spectral-example.js index 15d12af13..e6cdb4793 100644 --- a/examples/spectral/spectral-example.js +++ b/examples/spectral/spectral-example.js @@ -1,5 +1,5 @@ /* - * Copyright 2022 Code Intelligence GmbH + * Copyright 2023 Code Intelligence GmbH * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/examples/xml/fuzz.js b/examples/xml/fuzz.js index 104e4128b..8712798a7 100644 --- a/examples/xml/fuzz.js +++ b/examples/xml/fuzz.js @@ -1,3 +1,19 @@ +/* + * Copyright 2023 Code Intelligence GmbH + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License 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. + */ + // The code in this file is based on the examples available in JSFuzz: // https://gitlab.com/gitlab-org/security-products/analyzers/fuzzers/jsfuzz/-/blob/34a694a8c73bfe0895c4e24784ba5b6dfe964b94/examples/xml/fuzz.js // The original code is available under the Apache License 2.0. diff --git a/fuzztests/runFuzzTests.js b/fuzztests/runFuzzTests.js index 6fe57c755..9377cdaf7 100755 --- a/fuzztests/runFuzzTests.js +++ b/fuzztests/runFuzzTests.js @@ -1,4 +1,19 @@ #!/usr/bin/node +/* + * Copyright 2023 Code Intelligence GmbH + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License 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. + */ // Helper script that searches for Jest fuzz tests in the current directory and // executes them in new processes using the found fuzz test names. diff --git a/jest.config.js b/jest.config.js index 30b2e4ba4..4d7d0b927 100644 --- a/jest.config.js +++ b/jest.config.js @@ -1,5 +1,5 @@ /* - * Copyright 2022 Code Intelligence GmbH + * Copyright 2023 Code Intelligence GmbH * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/package-lock.json b/package-lock.json index e717a5736..dcb167ad6 100644 --- a/package-lock.json +++ b/package-lock.json @@ -19,6 +19,7 @@ "@typescript-eslint/eslint-plugin": "^6.2.1", "eslint": "^8.46.0", "eslint-config-prettier": "^8.9.0", + "eslint-plugin-header": "^3.1.1", "eslint-plugin-jest": "^27.2.3", "eslint-plugin-markdownlint": "^0.4.1", "husky": "^8.0.3", @@ -3273,6 +3274,15 @@ "eslint": ">=7.0.0" } }, + "node_modules/eslint-plugin-header": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/eslint-plugin-header/-/eslint-plugin-header-3.1.1.tgz", + "integrity": "sha512-9vlKxuJ4qf793CmeeSrZUvVClw6amtpghq3CuWcB5cUNnWHQhgcqy5eF8oVKFk1G3Y/CbchGfEaw3wiIJaNmVg==", + "dev": true, + "peerDependencies": { + "eslint": ">=7.7.0" + } + }, "node_modules/eslint-plugin-jest": { "version": "27.2.3", "resolved": "https://registry.npmjs.org/eslint-plugin-jest/-/eslint-plugin-jest-27.2.3.tgz", @@ -11621,6 +11631,13 @@ "dev": true, "requires": {} }, + "eslint-plugin-header": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/eslint-plugin-header/-/eslint-plugin-header-3.1.1.tgz", + "integrity": "sha512-9vlKxuJ4qf793CmeeSrZUvVClw6amtpghq3CuWcB5cUNnWHQhgcqy5eF8oVKFk1G3Y/CbchGfEaw3wiIJaNmVg==", + "dev": true, + "requires": {} + }, "eslint-plugin-jest": { "version": "27.2.3", "resolved": "https://registry.npmjs.org/eslint-plugin-jest/-/eslint-plugin-jest-27.2.3.tgz", diff --git a/package.json b/package.json index 31a8eed20..eac3428de 100644 --- a/package.json +++ b/package.json @@ -42,6 +42,7 @@ "@typescript-eslint/eslint-plugin": "^6.2.1", "eslint": "^8.46.0", "eslint-config-prettier": "^8.9.0", + "eslint-plugin-header": "^3.1.1", "eslint-plugin-jest": "^27.2.3", "eslint-plugin-markdownlint": "^0.4.1", "husky": "^8.0.3", diff --git a/packages/core/FuzzedDataProvider.test.ts b/packages/core/FuzzedDataProvider.test.ts index e892bc955..48cdfa8fe 100644 --- a/packages/core/FuzzedDataProvider.test.ts +++ b/packages/core/FuzzedDataProvider.test.ts @@ -1,5 +1,5 @@ /* - * Copyright 2022 Code Intelligence GmbH + * Copyright 2023 Code Intelligence GmbH * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/packages/core/FuzzedDataProvider.ts b/packages/core/FuzzedDataProvider.ts index ddd1151ae..3932fb7c5 100644 --- a/packages/core/FuzzedDataProvider.ts +++ b/packages/core/FuzzedDataProvider.ts @@ -1,5 +1,5 @@ /* - * Copyright 2022 Code Intelligence GmbH + * Copyright 2023 Code Intelligence GmbH * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/packages/core/cli.ts b/packages/core/cli.ts index f69aea0de..bf348cfbc 100644 --- a/packages/core/cli.ts +++ b/packages/core/cli.ts @@ -1,6 +1,6 @@ #!/usr/bin/env node /* - * Copyright 2022 Code Intelligence GmbH + * Copyright 2023 Code Intelligence GmbH * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/packages/core/finding.ts b/packages/core/finding.ts index 2dd511038..b1cd64c79 100644 --- a/packages/core/finding.ts +++ b/packages/core/finding.ts @@ -12,7 +12,6 @@ * 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. - * */ import process from "process"; diff --git a/packages/core/options.ts b/packages/core/options.ts index 423475785..4f7afdfe0 100644 --- a/packages/core/options.ts +++ b/packages/core/options.ts @@ -12,7 +12,6 @@ * 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. - * */ import * as tmp from "tmp"; diff --git a/packages/fuzzer/fuzzer.test.ts b/packages/fuzzer/fuzzer.test.ts index 8b9d991f4..d2b1e909b 100644 --- a/packages/fuzzer/fuzzer.test.ts +++ b/packages/fuzzer/fuzzer.test.ts @@ -1,5 +1,5 @@ /* - * Copyright 2022 Code Intelligence GmbH + * Copyright 2023 Code Intelligence GmbH * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/packages/fuzzer/fuzzer.ts b/packages/fuzzer/fuzzer.ts index 0cda36f50..5944da2a2 100644 --- a/packages/fuzzer/fuzzer.ts +++ b/packages/fuzzer/fuzzer.ts @@ -1,5 +1,5 @@ /* - * Copyright 2022 Code Intelligence GmbH + * Copyright 2023 Code Intelligence GmbH * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/packages/hooking/hook.ts b/packages/hooking/hook.ts index b7b82b9df..c8f8e4d12 100644 --- a/packages/hooking/hook.ts +++ b/packages/hooking/hook.ts @@ -1,5 +1,5 @@ /* - * Copyright 2022 Code Intelligence GmbH + * Copyright 2023 Code Intelligence GmbH * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/packages/hooking/index.ts b/packages/hooking/index.ts index f2093d236..b2ac5abb4 100644 --- a/packages/hooking/index.ts +++ b/packages/hooking/index.ts @@ -1,5 +1,5 @@ /* - * Copyright 2022 Code Intelligence GmbH + * Copyright 2023 Code Intelligence GmbH * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/packages/instrumentor/instrument.test.ts b/packages/instrumentor/instrument.test.ts index b90365679..9883247d7 100644 --- a/packages/instrumentor/instrument.test.ts +++ b/packages/instrumentor/instrument.test.ts @@ -1,5 +1,5 @@ /* - * Copyright 2022 Code Intelligence GmbH + * Copyright 2023 Code Intelligence GmbH * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/packages/instrumentor/plugins/codeCoverage.test.ts b/packages/instrumentor/plugins/codeCoverage.test.ts index 9bd44cd58..25a019708 100644 --- a/packages/instrumentor/plugins/codeCoverage.test.ts +++ b/packages/instrumentor/plugins/codeCoverage.test.ts @@ -1,5 +1,5 @@ /* - * Copyright 2022 Code Intelligence GmbH + * Copyright 2023 Code Intelligence GmbH * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/packages/instrumentor/plugins/codeCoverage.ts b/packages/instrumentor/plugins/codeCoverage.ts index d31a50855..057b6a388 100644 --- a/packages/instrumentor/plugins/codeCoverage.ts +++ b/packages/instrumentor/plugins/codeCoverage.ts @@ -1,5 +1,5 @@ /* - * Copyright 2022 Code Intelligence GmbH + * Copyright 2023 Code Intelligence GmbH * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/packages/instrumentor/plugins/compareHooks.test.ts b/packages/instrumentor/plugins/compareHooks.test.ts index ff9a235f3..35a08593e 100644 --- a/packages/instrumentor/plugins/compareHooks.test.ts +++ b/packages/instrumentor/plugins/compareHooks.test.ts @@ -1,5 +1,5 @@ /* - * Copyright 2022 Code Intelligence GmbH + * Copyright 2023 Code Intelligence GmbH * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/packages/instrumentor/plugins/compareHooks.ts b/packages/instrumentor/plugins/compareHooks.ts index b092ccf54..8075947f9 100644 --- a/packages/instrumentor/plugins/compareHooks.ts +++ b/packages/instrumentor/plugins/compareHooks.ts @@ -1,5 +1,5 @@ /* - * Copyright 2022 Code Intelligence GmbH + * Copyright 2023 Code Intelligence GmbH * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/packages/instrumentor/plugins/functionHooks.test.ts b/packages/instrumentor/plugins/functionHooks.test.ts index d77034f3c..9618db25a 100644 --- a/packages/instrumentor/plugins/functionHooks.test.ts +++ b/packages/instrumentor/plugins/functionHooks.test.ts @@ -1,5 +1,5 @@ /* - * Copyright 2022 Code Intelligence GmbH + * Copyright 2023 Code Intelligence GmbH * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/packages/instrumentor/plugins/functionHooks.ts b/packages/instrumentor/plugins/functionHooks.ts index e5ab3e80e..f04c0a9b3 100644 --- a/packages/instrumentor/plugins/functionHooks.ts +++ b/packages/instrumentor/plugins/functionHooks.ts @@ -1,5 +1,5 @@ /* - * Copyright 2022 Code Intelligence GmbH + * Copyright 2023 Code Intelligence GmbH * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/packages/instrumentor/plugins/helpers.ts b/packages/instrumentor/plugins/helpers.ts index 9f27718a4..5f8464ca6 100644 --- a/packages/instrumentor/plugins/helpers.ts +++ b/packages/instrumentor/plugins/helpers.ts @@ -1,3 +1,19 @@ +/* + * Copyright 2023 Code Intelligence GmbH + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License 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. + */ + import { NumericLiteral } from "@babel/types"; import { types } from "@babel/core"; import * as crypto from "crypto"; diff --git a/packages/instrumentor/plugins/testhelpers.ts b/packages/instrumentor/plugins/testhelpers.ts index c9d67593a..83dc7cb69 100644 --- a/packages/instrumentor/plugins/testhelpers.ts +++ b/packages/instrumentor/plugins/testhelpers.ts @@ -1,5 +1,5 @@ /* - * Copyright 2022 Code Intelligence GmbH + * Copyright 2023 Code Intelligence GmbH * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/packages/jest-runner/config.test.ts b/packages/jest-runner/config.test.ts index 7bb8ccdd8..7a9e9ad63 100644 --- a/packages/jest-runner/config.test.ts +++ b/packages/jest-runner/config.test.ts @@ -1,5 +1,5 @@ /* - * Copyright 2022 Code Intelligence GmbH + * Copyright 2023 Code Intelligence GmbH * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/packages/jest-runner/config.ts b/packages/jest-runner/config.ts index 7c3407f10..35009c910 100644 --- a/packages/jest-runner/config.ts +++ b/packages/jest-runner/config.ts @@ -1,5 +1,5 @@ /* - * Copyright 2022 Code Intelligence GmbH + * Copyright 2023 Code Intelligence GmbH * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/packages/jest-runner/corpus.test.ts b/packages/jest-runner/corpus.test.ts index a35c3ba82..8866c92d9 100644 --- a/packages/jest-runner/corpus.test.ts +++ b/packages/jest-runner/corpus.test.ts @@ -1,5 +1,5 @@ /* - * Copyright 2022 Code Intelligence GmbH + * Copyright 2023 Code Intelligence GmbH * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/packages/jest-runner/corpus.ts b/packages/jest-runner/corpus.ts index 424d4d4fe..430d85d5f 100644 --- a/packages/jest-runner/corpus.ts +++ b/packages/jest-runner/corpus.ts @@ -1,5 +1,5 @@ /* - * Copyright 2022 Code Intelligence GmbH + * Copyright 2023 Code Intelligence GmbH * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/packages/jest-runner/errorUtils.test.ts b/packages/jest-runner/errorUtils.test.ts index 396b9b8ab..a78ebfe66 100644 --- a/packages/jest-runner/errorUtils.test.ts +++ b/packages/jest-runner/errorUtils.test.ts @@ -1,5 +1,5 @@ /* - * Copyright 2022 Code Intelligence GmbH + * Copyright 2023 Code Intelligence GmbH * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/packages/jest-runner/errorUtils.ts b/packages/jest-runner/errorUtils.ts index e08c0faf8..cb7a5b6ae 100644 --- a/packages/jest-runner/errorUtils.ts +++ b/packages/jest-runner/errorUtils.ts @@ -1,5 +1,5 @@ /* - * Copyright 2022 Code Intelligence GmbH + * Copyright 2023 Code Intelligence GmbH * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/packages/jest-runner/fuzz.test.ts b/packages/jest-runner/fuzz.test.ts index ba3e67fed..2b50a53dc 100644 --- a/packages/jest-runner/fuzz.test.ts +++ b/packages/jest-runner/fuzz.test.ts @@ -1,5 +1,5 @@ /* - * Copyright 2022 Code Intelligence GmbH + * Copyright 2023 Code Intelligence GmbH * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/packages/jest-runner/fuzz.ts b/packages/jest-runner/fuzz.ts index 1d1c60e98..8098522e7 100644 --- a/packages/jest-runner/fuzz.ts +++ b/packages/jest-runner/fuzz.ts @@ -1,5 +1,5 @@ /* - * Copyright 2022 Code Intelligence GmbH + * Copyright 2023 Code Intelligence GmbH * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/packages/jest-runner/index.ts b/packages/jest-runner/index.ts index 524578f2e..3c988e123 100644 --- a/packages/jest-runner/index.ts +++ b/packages/jest-runner/index.ts @@ -1,5 +1,5 @@ /* - * Copyright 2022 Code Intelligence GmbH + * Copyright 2023 Code Intelligence GmbH * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/packages/jest-runner/worker.ts b/packages/jest-runner/worker.ts index 0d565473b..aab989a8a 100644 --- a/packages/jest-runner/worker.ts +++ b/packages/jest-runner/worker.ts @@ -1,5 +1,5 @@ /* - * Copyright 2022 Code Intelligence GmbH + * Copyright 2023 Code Intelligence GmbH * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/tests/bug-detectors/command-injection/makeFRIENDLY.js b/tests/bug-detectors/command-injection/makeFRIENDLY.js index c1db1b878..1873081e9 100644 --- a/tests/bug-detectors/command-injection/makeFRIENDLY.js +++ b/tests/bug-detectors/command-injection/makeFRIENDLY.js @@ -1,3 +1,19 @@ +/* + * Copyright 2023 Code Intelligence GmbH + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License 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. + */ + const fs = require("fs"); fs.writeFileSync("FRIENDLY", ""); diff --git a/tests/code_coverage/sample_fuzz_test/custom-hooks.js b/tests/code_coverage/sample_fuzz_test/custom-hooks.js index f187f36b0..5b88def16 100644 --- a/tests/code_coverage/sample_fuzz_test/custom-hooks.js +++ b/tests/code_coverage/sample_fuzz_test/custom-hooks.js @@ -1,3 +1,19 @@ +/* + * Copyright 2023 Code Intelligence GmbH + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License 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. + */ + const { registerReplaceHook } = require("@jazzer.js/hooking"); registerReplaceHook("foo", "lib", false, () => { diff --git a/tests/code_coverage/sample_fuzz_test/expected_coverage/fuzz+lib+codeCoverage-fuzz.json b/tests/code_coverage/sample_fuzz_test/expected_coverage/fuzz+lib+codeCoverage-fuzz.json index c2501a525..5095d3e76 100644 --- a/tests/code_coverage/sample_fuzz_test/expected_coverage/fuzz+lib+codeCoverage-fuzz.json +++ b/tests/code_coverage/sample_fuzz_test/expected_coverage/fuzz+lib+codeCoverage-fuzz.json @@ -118,55 +118,55 @@ "lib.js": { "statementMap": { "0": { - "start": { "line": 2, "column": 1 }, - "end": { "line": 2, "column": 29 } + "start": { "line": 18, "column": 1 }, + "end": { "line": 18, "column": 29 } }, "1": { - "start": { "line": 3, "column": 1 }, - "end": { "line": 5, "column": 2 } + "start": { "line": 19, "column": 1 }, + "end": { "line": 21, "column": 2 } }, "2": { - "start": { "line": 4, "column": 2 }, - "end": { "line": 4, "column": 11 } + "start": { "line": 20, "column": 2 }, + "end": { "line": 20, "column": 11 } }, "3": { - "start": { "line": 6, "column": 1 }, - "end": { "line": 6, "column": 11 } + "start": { "line": 22, "column": 1 }, + "end": { "line": 22, "column": 11 } }, "4": { - "start": { "line": 9, "column": 0 }, - "end": { "line": 11, "column": 2 } + "start": { "line": 25, "column": 0 }, + "end": { "line": 27, "column": 2 } } }, "fnMap": { "0": { "name": "foo", "decl": { - "start": { "line": 1, "column": 9 }, - "end": { "line": 1, "column": 12 } + "start": { "line": 17, "column": 9 }, + "end": { "line": 17, "column": 12 } }, "loc": { - "start": { "line": 1, "column": 16 }, - "end": { "line": 7, "column": 1 } + "start": { "line": 17, "column": 16 }, + "end": { "line": 23, "column": 1 } }, - "line": 1 + "line": 17 } }, "branchMap": { "0": { "loc": { - "start": { "line": 3, "column": 1 }, - "end": { "line": 5, "column": 2 } + "start": { "line": 19, "column": 1 }, + "end": { "line": 21, "column": 2 } }, "type": "if", "locations": [ { - "start": { "line": 3, "column": 1 }, - "end": { "line": 5, "column": 2 } + "start": { "line": 19, "column": 1 }, + "end": { "line": 21, "column": 2 } }, { "start": {}, "end": {} } ], - "line": 3 + "line": 19 } }, "s": { "0": 1, "1": 1, "2": 1, "3": 0, "4": 1 }, diff --git a/tests/code_coverage/sample_fuzz_test/expected_coverage/fuzz+lib+customHooks.json b/tests/code_coverage/sample_fuzz_test/expected_coverage/fuzz+lib+customHooks.json index c972495e6..92b89d35c 100644 --- a/tests/code_coverage/sample_fuzz_test/expected_coverage/fuzz+lib+customHooks.json +++ b/tests/code_coverage/sample_fuzz_test/expected_coverage/fuzz+lib+customHooks.json @@ -2,30 +2,30 @@ "custom-hooks.js": { "statementMap": { "0": { - "start": { "line": 1, "column": 32 }, - "end": { "line": 1, "column": 61 } + "start": { "line": 17, "column": 32 }, + "end": { "line": 17, "column": 61 } }, "1": { - "start": { "line": 3, "column": 0 }, - "end": { "line": 5, "column": 3 } + "start": { "line": 19, "column": 0 }, + "end": { "line": 21, "column": 3 } }, "2": { - "start": { "line": 4, "column": 1 }, - "end": { "line": 4, "column": 37 } + "start": { "line": 20, "column": 1 }, + "end": { "line": 20, "column": 37 } } }, "fnMap": { "0": { "name": "(anonymous_0)", "decl": { - "start": { "line": 3, "column": 41 }, - "end": { "line": 3, "column": 42 } + "start": { "line": 19, "column": 41 }, + "end": { "line": 19, "column": 42 } }, "loc": { - "start": { "line": 3, "column": 47 }, - "end": { "line": 5, "column": 1 } + "start": { "line": 19, "column": 47 }, + "end": { "line": 21, "column": 1 } }, - "line": 3 + "line": 19 } }, "branchMap": {}, @@ -102,55 +102,55 @@ "lib.js": { "statementMap": { "0": { - "start": { "line": 2, "column": 1 }, - "end": { "line": 2, "column": 29 } + "start": { "line": 18, "column": 1 }, + "end": { "line": 18, "column": 29 } }, "1": { - "start": { "line": 3, "column": 1 }, - "end": { "line": 5, "column": 2 } + "start": { "line": 19, "column": 1 }, + "end": { "line": 21, "column": 2 } }, "2": { - "start": { "line": 4, "column": 2 }, - "end": { "line": 4, "column": 11 } + "start": { "line": 20, "column": 2 }, + "end": { "line": 20, "column": 11 } }, "3": { - "start": { "line": 6, "column": 1 }, - "end": { "line": 6, "column": 11 } + "start": { "line": 22, "column": 1 }, + "end": { "line": 22, "column": 11 } }, "4": { - "start": { "line": 9, "column": 0 }, - "end": { "line": 11, "column": 2 } + "start": { "line": 25, "column": 0 }, + "end": { "line": 27, "column": 2 } } }, "fnMap": { "0": { "name": "foo", "decl": { - "start": { "line": 1, "column": 9 }, - "end": { "line": 1, "column": 12 } + "start": { "line": 17, "column": 9 }, + "end": { "line": 17, "column": 12 } }, "loc": { - "start": { "line": 1, "column": 16 }, - "end": { "line": 7, "column": 1 } + "start": { "line": 17, "column": 16 }, + "end": { "line": 23, "column": 1 } }, - "line": 1 + "line": 17 } }, "branchMap": { "0": { "loc": { - "start": { "line": 3, "column": 1 }, - "end": { "line": 5, "column": 2 } + "start": { "line": 19, "column": 1 }, + "end": { "line": 21, "column": 2 } }, "type": "if", "locations": [ { - "start": { "line": 3, "column": 1 }, - "end": { "line": 5, "column": 2 } + "start": { "line": 19, "column": 1 }, + "end": { "line": 21, "column": 2 } }, { "start": {}, "end": {} } ], - "line": 3 + "line": 19 } }, "s": { "0": 0, "1": 0, "2": 0, "3": 0, "4": 1 }, diff --git a/tests/code_coverage/sample_fuzz_test/expected_coverage/fuzz+lib+otherCodeCoverage-fuzz.json b/tests/code_coverage/sample_fuzz_test/expected_coverage/fuzz+lib+otherCodeCoverage-fuzz.json index 4e55f72da..c898e9329 100644 --- a/tests/code_coverage/sample_fuzz_test/expected_coverage/fuzz+lib+otherCodeCoverage-fuzz.json +++ b/tests/code_coverage/sample_fuzz_test/expected_coverage/fuzz+lib+otherCodeCoverage-fuzz.json @@ -127,55 +127,55 @@ "lib.js": { "statementMap": { "0": { - "start": { "line": 2, "column": 1 }, - "end": { "line": 2, "column": 29 } + "start": { "line": 18, "column": 1 }, + "end": { "line": 18, "column": 29 } }, "1": { - "start": { "line": 3, "column": 1 }, - "end": { "line": 5, "column": 2 } + "start": { "line": 19, "column": 1 }, + "end": { "line": 21, "column": 2 } }, "2": { - "start": { "line": 4, "column": 2 }, - "end": { "line": 4, "column": 11 } + "start": { "line": 20, "column": 2 }, + "end": { "line": 20, "column": 11 } }, "3": { - "start": { "line": 6, "column": 1 }, - "end": { "line": 6, "column": 11 } + "start": { "line": 22, "column": 1 }, + "end": { "line": 22, "column": 11 } }, "4": { - "start": { "line": 9, "column": 0 }, - "end": { "line": 11, "column": 2 } + "start": { "line": 25, "column": 0 }, + "end": { "line": 27, "column": 2 } } }, "fnMap": { "0": { "name": "foo", "decl": { - "start": { "line": 1, "column": 9 }, - "end": { "line": 1, "column": 12 } + "start": { "line": 17, "column": 9 }, + "end": { "line": 17, "column": 12 } }, "loc": { - "start": { "line": 1, "column": 16 }, - "end": { "line": 7, "column": 1 } + "start": { "line": 17, "column": 16 }, + "end": { "line": 23, "column": 1 } }, - "line": 1 + "line": 17 } }, "branchMap": { "0": { "loc": { - "start": { "line": 3, "column": 1 }, - "end": { "line": 5, "column": 2 } + "start": { "line": 19, "column": 1 }, + "end": { "line": 21, "column": 2 } }, "type": "if", "locations": [ { - "start": { "line": 3, "column": 1 }, - "end": { "line": 5, "column": 2 } + "start": { "line": 19, "column": 1 }, + "end": { "line": 21, "column": 2 } }, { "start": {}, "end": {} } ], - "line": 3 + "line": 19 } }, "s": { "0": 1, "1": 1, "2": 1, "3": 0, "4": 1 }, diff --git a/tests/code_coverage/sample_fuzz_test/expected_coverage/fuzz+lib.json b/tests/code_coverage/sample_fuzz_test/expected_coverage/fuzz+lib.json index ef204720f..888a25782 100644 --- a/tests/code_coverage/sample_fuzz_test/expected_coverage/fuzz+lib.json +++ b/tests/code_coverage/sample_fuzz_test/expected_coverage/fuzz+lib.json @@ -66,55 +66,55 @@ "lib.js": { "statementMap": { "0": { - "start": { "line": 2, "column": 1 }, - "end": { "line": 2, "column": 29 } + "start": { "line": 18, "column": 1 }, + "end": { "line": 18, "column": 29 } }, "1": { - "start": { "line": 3, "column": 1 }, - "end": { "line": 5, "column": 2 } + "start": { "line": 19, "column": 1 }, + "end": { "line": 21, "column": 2 } }, "2": { - "start": { "line": 4, "column": 2 }, - "end": { "line": 4, "column": 11 } + "start": { "line": 20, "column": 2 }, + "end": { "line": 20, "column": 11 } }, "3": { - "start": { "line": 6, "column": 1 }, - "end": { "line": 6, "column": 11 } + "start": { "line": 22, "column": 1 }, + "end": { "line": 22, "column": 11 } }, "4": { - "start": { "line": 9, "column": 0 }, - "end": { "line": 11, "column": 2 } + "start": { "line": 25, "column": 0 }, + "end": { "line": 27, "column": 2 } } }, "fnMap": { "0": { "name": "foo", "decl": { - "start": { "line": 1, "column": 9 }, - "end": { "line": 1, "column": 12 } + "start": { "line": 17, "column": 9 }, + "end": { "line": 17, "column": 12 } }, "loc": { - "start": { "line": 1, "column": 16 }, - "end": { "line": 7, "column": 1 } + "start": { "line": 17, "column": 16 }, + "end": { "line": 23, "column": 1 } }, - "line": 1 + "line": 17 } }, "branchMap": { "0": { "loc": { - "start": { "line": 3, "column": 1 }, - "end": { "line": 5, "column": 2 } + "start": { "line": 19, "column": 1 }, + "end": { "line": 21, "column": 2 } }, "type": "if", "locations": [ { - "start": { "line": 3, "column": 1 }, - "end": { "line": 5, "column": 2 } + "start": { "line": 19, "column": 1 }, + "end": { "line": 21, "column": 2 } }, { "start": {}, "end": {} } ], - "line": 3 + "line": 19 } }, "s": { "0": 1, "1": 1, "2": 1, "3": 0, "4": 1 }, diff --git a/tests/code_coverage/sample_fuzz_test/fuzz.js b/tests/code_coverage/sample_fuzz_test/fuzz.js index e057e220a..3d2bed16b 100644 --- a/tests/code_coverage/sample_fuzz_test/fuzz.js +++ b/tests/code_coverage/sample_fuzz_test/fuzz.js @@ -1,5 +1,5 @@ /* - * Copyright 2022 Code Intelligence GmbH + * Copyright 2023 Code Intelligence GmbH * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/tests/code_coverage/sample_fuzz_test/lib.js b/tests/code_coverage/sample_fuzz_test/lib.js index fed72f772..6d460de6c 100644 --- a/tests/code_coverage/sample_fuzz_test/lib.js +++ b/tests/code_coverage/sample_fuzz_test/lib.js @@ -1,3 +1,19 @@ +/* + * Copyright 2023 Code Intelligence GmbH + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License 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. + */ + function foo(a) { console.log("original foo"); if (a > 10) { diff --git a/tests/done_callback/fuzz.js b/tests/done_callback/fuzz.js index f288e8b1d..b18543fa6 100644 --- a/tests/done_callback/fuzz.js +++ b/tests/done_callback/fuzz.js @@ -1,5 +1,5 @@ /* - * Copyright 2022 Code Intelligence GmbH + * Copyright 2023 Code Intelligence GmbH * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/tests/promise/fuzz.js b/tests/promise/fuzz.js index 669db3f7b..015f4574d 100644 --- a/tests/promise/fuzz.js +++ b/tests/promise/fuzz.js @@ -1,5 +1,5 @@ /* - * Copyright 2022 Code Intelligence GmbH + * Copyright 2023 Code Intelligence GmbH * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/tests/return_values/exampleCode/code.js b/tests/return_values/exampleCode/code.js index 0804e74e1..c9b2298de 100644 --- a/tests/return_values/exampleCode/code.js +++ b/tests/return_values/exampleCode/code.js @@ -1,3 +1,19 @@ +/* + * Copyright 2023 Code Intelligence GmbH + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License 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. + */ + const ReturnType = { SYNC: "sync", ASYNC: "async", diff --git a/tests/string_compare/fuzz.js b/tests/string_compare/fuzz.js index 0d2f16989..ef579cfaa 100644 --- a/tests/string_compare/fuzz.js +++ b/tests/string_compare/fuzz.js @@ -1,5 +1,5 @@ /* - * Copyright 2022 Code Intelligence GmbH + * Copyright 2023 Code Intelligence GmbH * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/tests/switch/fuzz.js b/tests/switch/fuzz.js index 5da50d5f3..91ccf5e08 100644 --- a/tests/switch/fuzz.js +++ b/tests/switch/fuzz.js @@ -1,5 +1,5 @@ /* - * Copyright 2022 Code Intelligence GmbH + * Copyright 2023 Code Intelligence GmbH * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/tests/timeout/fuzz.js b/tests/timeout/fuzz.js index dd9322ae4..19a33fe80 100644 --- a/tests/timeout/fuzz.js +++ b/tests/timeout/fuzz.js @@ -1,5 +1,5 @@ /* - * Copyright 2022 Code Intelligence GmbH + * Copyright 2023 Code Intelligence GmbH * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/tests/value_profiling/fuzz.js b/tests/value_profiling/fuzz.js index 84717be52..8c9142718 100644 --- a/tests/value_profiling/fuzz.js +++ b/tests/value_profiling/fuzz.js @@ -1,5 +1,5 @@ /* - * Copyright 2022 Code Intelligence GmbH + * Copyright 2023 Code Intelligence GmbH * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License.