Skip to content

[WIP] Lint javascript for license header and add licence to js files #843

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

Open
wants to merge 2 commits into
base: develop
Choose a base branch
from
Open
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
22 changes: 16 additions & 6 deletions package-lock.json

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

7 changes: 5 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,8 @@
"src/webpack/**"
],
"plugins": [
"no-unsanitized"
"no-unsanitized",
"license-header"
],
"rules": {
"no-negated-condition": "warn",
Expand Down Expand Up @@ -82,7 +83,8 @@
"unicorn/prefer-includes": "warn",
"unicorn/prefer-string-slice": "warn",
"unicorn/filename-case": "warn",
"unicorn/prefer-query-selector": "warn"
"unicorn/prefer-query-selector": "warn",
"license-header/header": [ "error", "./gradle/spotless/license.java" ]
}
},
"repository": {
Expand All @@ -103,6 +105,7 @@
"devDependencies": {
"ava": "^3.13.0",
"css-loader": "^5.0.1",
"eslint-plugin-license-header": "^0.2.0",
"eslint-plugin-no-unsanitized": "^3.1.4",
"lint-staged": "^10.5.1",
"vue-loader": "^15.9.5",
Expand Down
22 changes: 20 additions & 2 deletions src/main/zapHomeFiles/hud/display.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,23 @@
/*
* Zed Attack Proxy (ZAP) and its related class files.
*
* ZAP is an HTTP/HTTPS proxy for assessing web application security.
*
* Copyright $YEAR The ZAP Development Team
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It has the year as token.

*
* 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.
*/

// App is the main Vue object controlling everything
let app;
let tabId = '';
Expand Down Expand Up @@ -1125,8 +1145,6 @@ navigator.serviceWorker.addEventListener('message', event => {

channel.port1.addEventListener('message', event => {
// Open window and inject the HTML report
// FIXME: remove after #620
// eslint-disable-next-line no-unsanitized/property
Comment on lines -1128 to -1129
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should be reverted.

window.open('').document.body.innerHTML = event.data.response;
});

Expand Down
20 changes: 20 additions & 0 deletions src/main/zapHomeFiles/hud/drawer.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,23 @@
/*
* Zed Attack Proxy (ZAP) and its related class files.
*
* ZAP is an HTTP/HTTPS proxy for assessing web application security.
*
* Copyright $YEAR The ZAP Development Team
*
* 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.
*/

// App is the main Vue object controlling everything
let app;
const eventBus = new Vue();
Expand Down
20 changes: 20 additions & 0 deletions src/main/zapHomeFiles/hud/growlerAlerts.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,23 @@
/*
* Zed Attack Proxy (ZAP) and its related class files.
*
* ZAP is an HTTP/HTTPS proxy for assessing web application security.
*
* Copyright $YEAR The ZAP Development Team
*
* 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.
*/

// Injected string
const ZAP_HUD_FILES = '<<ZAP_HUD_FILES>>';

Expand Down
20 changes: 20 additions & 0 deletions src/main/zapHomeFiles/hud/management.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,23 @@
/*
* Zed Attack Proxy (ZAP) and its related class files.
*
* ZAP is an HTTP/HTTPS proxy for assessing web application security.
*
* Copyright $YEAR The ZAP Development Team
*
* 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.
*/

/*
* Management Frame
*
Expand Down
20 changes: 20 additions & 0 deletions src/main/zapHomeFiles/hud/panel.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,23 @@
/*
* Zed Attack Proxy (ZAP) and its related class files.
*
* ZAP is an HTTP/HTTPS proxy for assessing web application security.
*
* Copyright $YEAR The ZAP Development Team
*
* 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.
*/

/*
* Panel
*
Expand Down
20 changes: 20 additions & 0 deletions src/main/zapHomeFiles/hud/serviceworker.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,23 @@
/*
* Zed Attack Proxy (ZAP) and its related class files.
*
* ZAP is an HTTP/HTTPS proxy for assessing web application security.
*
* Copyright $YEAR The ZAP Development Team
*
* 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.
*/

// Injected strings
const ZAP_HUD_FILES = '<<ZAP_HUD_FILES>>';
const toolScripts = [
Expand Down
20 changes: 20 additions & 0 deletions src/main/zapHomeFiles/hud/target/inject.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,23 @@
/*
* Zed Attack Proxy (ZAP) and its related class files.
*
* ZAP is an HTTP/HTTPS proxy for assessing web application security.
*
* Copyright $YEAR The ZAP Development Team
*
* 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.
*/

/*
* Injection Module
*
Expand Down
20 changes: 20 additions & 0 deletions src/main/zapHomeFiles/hud/tools/activeScan.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,23 @@
/*
* Zed Attack Proxy (ZAP) and its related class files.
*
* ZAP is an HTTP/HTTPS proxy for assessing web application security.
*
* Copyright $YEAR The ZAP Development Team
*
* 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.
*/

/*
* Active Scan Tool
*
Expand Down
20 changes: 20 additions & 0 deletions src/main/zapHomeFiles/hud/tools/ajaxspider.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,23 @@
/*
* Zed Attack Proxy (ZAP) and its related class files.
*
* ZAP is an HTTP/HTTPS proxy for assessing web application security.
*
* Copyright $YEAR The ZAP Development Team
*
* 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.
*/

/*
* AjaxSpider Tool
*
Expand Down
20 changes: 20 additions & 0 deletions src/main/zapHomeFiles/hud/tools/attack.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,23 @@
/*
* Zed Attack Proxy (ZAP) and its related class files.
*
* ZAP is an HTTP/HTTPS proxy for assessing web application security.
*
* Copyright $YEAR The ZAP Development Team
*
* 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.
*/

/*
* Attack mode Tool
*
Expand Down
20 changes: 20 additions & 0 deletions src/main/zapHomeFiles/hud/tools/break.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,23 @@
/*
* Zed Attack Proxy (ZAP) and its related class files.
*
* ZAP is an HTTP/HTTPS proxy for assessing web application security.
*
* Copyright $YEAR The ZAP Development Team
*
* 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.
*/

/*
* Break Tool
*
Expand Down
20 changes: 20 additions & 0 deletions src/main/zapHomeFiles/hud/tools/commonAlerts.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,23 @@
/*
* Zed Attack Proxy (ZAP) and its related class files.
*
* ZAP is an HTTP/HTTPS proxy for assessing web application security.
*
* Copyright $YEAR The ZAP Development Team
*
* 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.
*/

/*
* Handles all of the alerts for the other alert tools
*
Expand Down
Loading