From 597e6e2de1fc5cc0634435613bc5923d8ffcbb68 Mon Sep 17 00:00:00 2001 From: Terrance DeJesus <99630311+terrancedejesus@users.noreply.github.com> Date: Mon, 24 Apr 2023 12:12:49 -0400 Subject: [PATCH] [Bug] Add `--add-historical` argument to lock versions workflow (#2739) * bug fix for lock version workflow * updated all use cases with build-release * added default to add historical * fixed flake errors --- .github/workflows/pythonpackage.yml | 2 +- detection_rules/devtools.py | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/pythonpackage.yml b/.github/workflows/pythonpackage.yml index 1cc1f7ec8..1e20e2527 100644 --- a/.github/workflows/pythonpackage.yml +++ b/.github/workflows/pythonpackage.yml @@ -41,7 +41,7 @@ jobs: # only generate the navigator files on push events to main GENERATE_NAVIGATOR_FILES: "${{ github.event_name == 'push' && github.ref == 'refs/heads/main' && '--generate-navigator' || ' ' }}" run: | - python -m detection_rules dev build-release $GENERATE_NAVIGATOR_FILES --add-historical 'no' + python -m detection_rules dev build-release $GENERATE_NAVIGATOR_FILES - name: Archive production artifacts for branch builds uses: actions/upload-artifact@v2 diff --git a/detection_rules/devtools.py b/detection_rules/devtools.py index 3a05479a5..d1d6f64bc 100644 --- a/detection_rules/devtools.py +++ b/detection_rules/devtools.py @@ -83,7 +83,8 @@ def dev_group(): @click.option('--update-version-lock', '-u', is_flag=True, help='Save version.lock.json file with updated rule versions in the package') @click.option('--generate-navigator', is_flag=True, help='Generate ATT&CK navigator files') -@click.option('--add-historical', type=str, required=True, help='Generate historical package-registry files') +@click.option('--add-historical', type=str, required=True, default="no", + help='Generate historical package-registry files') def build_release(config_file, update_version_lock: bool, generate_navigator: bool, add_historical: str, release=None, verbose=True): """Assemble all the rules into Kibana-ready release files."""