Skip to content
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

Package notice file with release #32

Merged
merged 4 commits into from
Jul 8, 2020

Conversation

brokensound77
Copy link
Collaborator

@brokensound77 brokensound77 commented Jul 8, 2020

Issues

resolves #31

Summary

Converts the notice.txt file to the expected notice.ts format and stages with it rules when building a package with build-release

This is the currently generated file:

/* eslint-disable @kbn/eslint/require-license-header */

/* @notice
 * Detection Rules
 * Copyright 2020 Elasticsearch B.V.
 * 
 * ---
 * This product bundles rules based on https://github.com/BlueTeamLabs/sentinel-attack
 * which is available under a "MIT" license. The files based on this license are:
 * 
 * - defense_evasion_via_filter_manager.toml
 * - discovery_process_discovery_via_tasklist_command.toml
 * - persistence_priv_escalation_via_accessibility_features.toml
 * - persistence_via_application_shimming.toml
 * - defense_evasion_execution_via_trusted_developer_utilities.toml
 * 
 * MIT License
 * 
 * Copyright (c) 2019 Edoardo Gerosa, Olaf Hartong
 * 
 * Permission is hereby granted, free of charge, to any person obtaining a copy of
 * this software and associated documentation files (the "Software"), to deal in
 * the Software without restriction, including without limitation the rights to
 * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
 * of the Software, and to permit persons to whom the Software is furnished to do
 * so, subject to the following conditions:
 * 
 * The above copyright notice and this permission notice shall be included in all
 * copies or substantial portions of the Software.
 * 
 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
 * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
 * SOFTWARE.
 */

Note added by @rw-access:
This will replace this file https://github.com/elastic/kibana/blob/1216b0f7cd2c0697393547432bee343ed33b96b5/x-pack/plugins/security_solution/server/lib/detection_engine/rules/prepackaged_rules/notice.ts

@rw-access rw-access requested a review from spong July 8, 2020 15:46
@rw-access
Copy link
Contributor

@spong does this work on your end? Will Kibana's NOTICE.txt automatically update based off this? How does that work?

@brokensound77
Copy link
Collaborator Author

For additional context, this will convert this repo's notice.txt to the example .ts file format above, so when a PR is made to kibana, the existing notice.ts file will be overwritten/updated

Copy link
Contributor

@rw-access rw-access left a comment

Choose a reason for hiding this comment

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

LGTM. 🚀

Co-authored-by: Ross Wolf <31489089+rw-access@users.noreply.github.com>
@spong
Copy link
Member

spong commented Jul 8, 2020

@spong does this work on your end? Will Kibana's NOTICE.txt automatically update based off this? How does that work?

Exactly! The @notice in the notice.ts will get picked up as part of the build and then generated into the NOTICE.txt that we know and love. 🙂

Copy link
Member

@spong spong left a comment

Choose a reason for hiding this comment

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

LGTM! Thanks for this bit of automation @brokensound77! 🙂

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Task] Add NOTICE.txt to the built packages
3 participants