From d1023fdbcedd4f91588abe12a1519874760bff34 Mon Sep 17 00:00:00 2001 From: rahul0216 Date: Wed, 20 Nov 2024 16:22:16 +0530 Subject: [PATCH 1/6] Adding 4 workflows --- .../workflows/documents-link-validation.yaml | 18 ++++++++++++++++++ .github/workflows/json-syntax-validation.yaml | 18 ++++++++++++++++++ .github/workflows/logo-validation.yaml | 18 ++++++++++++++++++ .github/workflows/yaml-syntax-validation.yaml | 19 +++++++++++++++++++ 4 files changed, 73 insertions(+) create mode 100644 .github/workflows/documents-link-validation.yaml create mode 100644 .github/workflows/json-syntax-validation.yaml create mode 100644 .github/workflows/logo-validation.yaml create mode 100644 .github/workflows/yaml-syntax-validation.yaml diff --git a/.github/workflows/documents-link-validation.yaml b/.github/workflows/documents-link-validation.yaml new file mode 100644 index 00000000000..d6d1a0b64c7 --- /dev/null +++ b/.github/workflows/documents-link-validation.yaml @@ -0,0 +1,18 @@ +name: Documents Broken Link Validation +run-name: Documents Broken Link Validation running on ${{ github.ref_name }} +on: + pull_request: + branches: + - master + # Allows to run workflow manually from the Actions tab + workflow_dispatch: +jobs: + DocumentsLinkValidation: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - run: npm install -g npm@6.14.15;which npm;npm -v + - name: npm install + run: npm + - name: Documents link locale validation + run: npm run tsc && node .script/documentsLinkValidator.js \ No newline at end of file diff --git a/.github/workflows/json-syntax-validation.yaml b/.github/workflows/json-syntax-validation.yaml new file mode 100644 index 00000000000..63392dc511d --- /dev/null +++ b/.github/workflows/json-syntax-validation.yaml @@ -0,0 +1,18 @@ +name: JSON File Syntax Validation +run-name: JSON File Syntax Validation running on ${{ github.ref_name }} +on: + pull_request: + branches: + - master + # Allows to run workflow manually from the Actions tab + workflow_dispatch: +jobs: + JsonFileValidation: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - run: npm install -g npm@6.14.15;which npm;npm -v + - name: npm install + run: npm + - name: Json File Syntax Validation + run: npm run tsc && node .script/jsonFileValidator.js \ No newline at end of file diff --git a/.github/workflows/logo-validation.yaml b/.github/workflows/logo-validation.yaml new file mode 100644 index 00000000000..82394cb032e --- /dev/null +++ b/.github/workflows/logo-validation.yaml @@ -0,0 +1,18 @@ +name: Logo Validation +run-name: Logo Validation running on ${{ github.ref_name }} +on: + pull_request: + branches: + - master + # Allows to run workflow manually from the Actions tab + workflow_dispatch: +jobs: + logoValidator: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - run: npm install -g npm@6.14.15;which npm;npm -v + - name: npm install + run: npm install + - name: Logo File Validation + run: npm run tsc && node .script/logoValidator.js \ No newline at end of file diff --git a/.github/workflows/yaml-syntax-validation.yaml b/.github/workflows/yaml-syntax-validation.yaml new file mode 100644 index 00000000000..f16203ea930 --- /dev/null +++ b/.github/workflows/yaml-syntax-validation.yaml @@ -0,0 +1,19 @@ +name: YAML File Syntax Validation +run-name: YAML File Syntax Validation running on ${{ github.ref_name }} +on: + pull_request: + branches: + - master + # Allows to run workflow manually from the Actions tab + workflow_dispatch: +jobs: + YamlFileValidation: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - run: npm install -g npm@6.14.15;which npm;npm -v + - name: npm install + run: npm + - name: YAML File Syntax Validation + run: npm run tsc && node .script/yamlFileValidator.js + \ No newline at end of file From d4e3048b95d2c85e2df4d8fe1be57cddd51a57a6 Mon Sep 17 00:00:00 2001 From: rahul0216 Date: Wed, 20 Nov 2024 16:28:04 +0530 Subject: [PATCH 2/6] Correcting npm command --- .github/workflows/documents-link-validation.yaml | 2 +- .github/workflows/json-syntax-validation.yaml | 2 +- .github/workflows/yaml-syntax-validation.yaml | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/documents-link-validation.yaml b/.github/workflows/documents-link-validation.yaml index d6d1a0b64c7..032974857e8 100644 --- a/.github/workflows/documents-link-validation.yaml +++ b/.github/workflows/documents-link-validation.yaml @@ -13,6 +13,6 @@ jobs: - uses: actions/checkout@v4 - run: npm install -g npm@6.14.15;which npm;npm -v - name: npm install - run: npm + run: npm install - name: Documents link locale validation run: npm run tsc && node .script/documentsLinkValidator.js \ No newline at end of file diff --git a/.github/workflows/json-syntax-validation.yaml b/.github/workflows/json-syntax-validation.yaml index 63392dc511d..70d057e2e80 100644 --- a/.github/workflows/json-syntax-validation.yaml +++ b/.github/workflows/json-syntax-validation.yaml @@ -13,6 +13,6 @@ jobs: - uses: actions/checkout@v4 - run: npm install -g npm@6.14.15;which npm;npm -v - name: npm install - run: npm + run: npm install - name: Json File Syntax Validation run: npm run tsc && node .script/jsonFileValidator.js \ No newline at end of file diff --git a/.github/workflows/yaml-syntax-validation.yaml b/.github/workflows/yaml-syntax-validation.yaml index f16203ea930..19d87ed0b95 100644 --- a/.github/workflows/yaml-syntax-validation.yaml +++ b/.github/workflows/yaml-syntax-validation.yaml @@ -13,7 +13,7 @@ jobs: - uses: actions/checkout@v4 - run: npm install -g npm@6.14.15;which npm;npm -v - name: npm install - run: npm + run: npm install - name: YAML File Syntax Validation run: npm run tsc && node .script/yamlFileValidator.js \ No newline at end of file From 8263bc0bbb2b5ffa41e13b378b5db96b90189ab8 Mon Sep 17 00:00:00 2001 From: rahul0216 Date: Thu, 21 Nov 2024 10:08:22 +0530 Subject: [PATCH 3/6] Adding more workflows --- .github/workflows/playbook-validations.yaml | 19 +++++++++++++++++++ .github/workflows/sample-data-validation.yaml | 18 ++++++++++++++++++ .github/workflows/solution-validations.yaml | 19 +++++++++++++++++++ .../workbook-metadata-validations.yaml | 18 ++++++++++++++++++ .../workbook-template-validations.yaml | 18 ++++++++++++++++++ 5 files changed, 92 insertions(+) create mode 100644 .github/workflows/playbook-validations.yaml create mode 100644 .github/workflows/sample-data-validation.yaml create mode 100644 .github/workflows/solution-validations.yaml create mode 100644 .github/workflows/workbook-metadata-validations.yaml create mode 100644 .github/workflows/workbook-template-validations.yaml diff --git a/.github/workflows/playbook-validations.yaml b/.github/workflows/playbook-validations.yaml new file mode 100644 index 00000000000..4f73e915fcf --- /dev/null +++ b/.github/workflows/playbook-validations.yaml @@ -0,0 +1,19 @@ +name: Playbook Validations +run-name: Playbook Validations running on ${{ github.ref_name }} +on: + pull_request: + branches: + - master + # Allows to run workflow manually from the Actions tab + workflow_dispatch: +jobs: + PlaybooksValidations: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - run: npm install -g npm@6.14.15;which npm;npm -v + - name: npm install + run: npm install + - name: Playbook Validations + run: npm run tsc && node .script/playbooksValidator.js + \ No newline at end of file diff --git a/.github/workflows/sample-data-validation.yaml b/.github/workflows/sample-data-validation.yaml new file mode 100644 index 00000000000..d5bc65f75a8 --- /dev/null +++ b/.github/workflows/sample-data-validation.yaml @@ -0,0 +1,18 @@ +name: Sample Data Validation +run-name: Sample Data Validation running on ${{ github.ref_name }} +on: + pull_request: + branches: + - master + # Allows to run workflow manually from the Actions tab + workflow_dispatch: +jobs: + sampleDataValidator: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - run: npm install -g npm@6.14.15;which npm;npm -v + - name: npm install + run: npm install + - name: Sample Data Validator + run: npm run tsc && node .script/sampleDataValidator.js \ No newline at end of file diff --git a/.github/workflows/solution-validations.yaml b/.github/workflows/solution-validations.yaml new file mode 100644 index 00000000000..fb06c8b0dd3 --- /dev/null +++ b/.github/workflows/solution-validations.yaml @@ -0,0 +1,19 @@ +name: Solution Validations +run-name: Solution Validations running on ${{ github.ref_name }} +on: + pull_request: + branches: + - master + # Allows to run workflow manually from the Actions tab + workflow_dispatch: +jobs: + SolutionValidations: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - run: npm install -g npm@6.14.15;which npm;npm -v + - name: npm install + run: npm install + - name: Solution Validations + run: npm run tsc && node .script/SolutionValidations/solutionValidator.js + \ No newline at end of file diff --git a/.github/workflows/workbook-metadata-validations.yaml b/.github/workflows/workbook-metadata-validations.yaml new file mode 100644 index 00000000000..fa864a77df3 --- /dev/null +++ b/.github/workflows/workbook-metadata-validations.yaml @@ -0,0 +1,18 @@ +name: Workbook Metadata Validations +run-name: Workbook Metadata Validations running on ${{ github.ref_name }} +on: + pull_request: + branches: + - master + # Allows to run workflow manually from the Actions tab + workflow_dispatch: +jobs: + WorkbooksValidations: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - run: npm install -g npm@6.14.15;which npm;npm -v + - name: npm install + run: npm install + - name: Workbooks Metadata Validations + run: npm run tsc && node .script/workbooksMetadataValidator.js \ No newline at end of file diff --git a/.github/workflows/workbook-template-validations.yaml b/.github/workflows/workbook-template-validations.yaml new file mode 100644 index 00000000000..0aa4f8fd958 --- /dev/null +++ b/.github/workflows/workbook-template-validations.yaml @@ -0,0 +1,18 @@ +name: Workbook Template Validations +run-name: Workbook Template Validations running on ${{ github.ref_name }} +on: + pull_request: + branches: + - master + # Allows to run workflow manually from the Actions tab + workflow_dispatch: +jobs: + WorkbooksTemplateValidations: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - run: npm install -g npm@6.14.15;which npm;npm -v + - name: npm install + run: npm install + - name: Workbooks Template Validations + run: npm run tsc && node .script/workbooksTemplateValidator.js \ No newline at end of file From 3d9b985094619c4082b6ec7c3d1bb1f79c64eed8 Mon Sep 17 00:00:00 2001 From: rahul0216 Date: Thu, 21 Nov 2024 23:29:18 +0530 Subject: [PATCH 4/6] Adding 5 more validations --- .github/workflows/content-validations.yaml | 18 ++++++++++++ .../workflows/data-connector-validations.yaml | 18 ++++++++++++ ...detection-template-schema-validations.yaml | 24 ++++++++++++++++ .github/workflows/detection-validations.yaml | 19 +++++++++++++ .github/workflows/kql-validations.yaml | 28 +++++++++++++++++++ 5 files changed, 107 insertions(+) create mode 100644 .github/workflows/content-validations.yaml create mode 100644 .github/workflows/data-connector-validations.yaml create mode 100644 .github/workflows/detection-template-schema-validations.yaml create mode 100644 .github/workflows/detection-validations.yaml create mode 100644 .github/workflows/kql-validations.yaml diff --git a/.github/workflows/content-validations.yaml b/.github/workflows/content-validations.yaml new file mode 100644 index 00000000000..ae1ba6024b9 --- /dev/null +++ b/.github/workflows/content-validations.yaml @@ -0,0 +1,18 @@ +name: Content Validations +run-name: Content Validation running on ${{ github.ref_name }} +on: + pull_request: + branches: + - master + # Allows to run workflow manually from the Actions tab + workflow_dispatch: +jobs: + ContentValidations: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - run: npm install -g npm@6.14.15;which npm;npm -v + - name: npm install + run: npm install + - name: File Content Validations + run: npm run tsc && node .script/contentValidator.js \ No newline at end of file diff --git a/.github/workflows/data-connector-validations.yaml b/.github/workflows/data-connector-validations.yaml new file mode 100644 index 00000000000..8180f1de357 --- /dev/null +++ b/.github/workflows/data-connector-validations.yaml @@ -0,0 +1,18 @@ +name: Data Connector Validations +run-name: Data Connector running on ${{ github.ref_name }} +on: + pull_request: + branches: + - master + # Allows to run workflow manually from the Actions tab + workflow_dispatch: +jobs: + DataConnectorValidations: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - run: npm install -g npm@6.14.15;which npm;npm -v + - name: npm install + run: npm install + - name: Data Connector Validations + run: npm run tsc && node .script/dataConnectorValidator.js \ No newline at end of file diff --git a/.github/workflows/detection-template-schema-validations.yaml b/.github/workflows/detection-template-schema-validations.yaml new file mode 100644 index 00000000000..ece93382c47 --- /dev/null +++ b/.github/workflows/detection-template-schema-validations.yaml @@ -0,0 +1,24 @@ +name: Detection Template Schema Validations +run-name: Detection Template Schema Validations running on ${{ github.ref_name }} +on: + pull_request: + branches: + - master + # Allows to run workflow manually from the Actions tab + workflow_dispatch: +jobs: + DetectionTemplateSchemaValidation: + runs-on: ubuntu-latest + env: + buildConfiguration: Release + dotnetSdkVersion: 3.1.401 + PRNUM: ${{ github.event.pull_request.number }} + steps: + - uses: actions/checkout@v4 + - name: Use .NET Core SDK ${{ env.dotnetSdkVersion }} + uses: actions/setup-dotnet@v4 + with: + dotnet-version: ${{ env.dotnetSdkVersion }} + - name: Run Detection template structure validation tests + run: dotnet test .script/tests/detectionTemplateSchemaValidation/DetectionTemplateSchemaValidation.Tests.csproj --configuration ${{ env.buildConfiguration }} + \ No newline at end of file diff --git a/.github/workflows/detection-validations.yaml b/.github/workflows/detection-validations.yaml new file mode 100644 index 00000000000..fed4174608d --- /dev/null +++ b/.github/workflows/detection-validations.yaml @@ -0,0 +1,19 @@ +name: Detection Validations +run-name: Detection Validations running on ${{ github.ref_name }} +on: + pull_request: + branches: + - master + # Allows to run workflow manually from the Actions tab + workflow_dispatch: +jobs: + DetectionsValidations: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - run: npm install -g npm@6.14.15;which npm;npm -v + - name: npm install + run: npm install + - name: Id Change Validation + run: npm run tsc && node .script/idChangeValidator.js + \ No newline at end of file diff --git a/.github/workflows/kql-validations.yaml b/.github/workflows/kql-validations.yaml new file mode 100644 index 00000000000..f0b572ae071 --- /dev/null +++ b/.github/workflows/kql-validations.yaml @@ -0,0 +1,28 @@ +name: Detection Validations +run-name: Detection Validations running on ${{ github.ref_name }} +on: + pull_request: + branches: + - master + # Allows to run workflow manually from the Actions tab + workflow_dispatch: +jobs: + KqlValidations: + runs-on: ubuntu-latest + env: + buildConfiguration: Release + dotnetSdkVersion: 6.0.x + PRNUM: ${{ github.event.pull_request.number }} + steps: + - uses: actions/checkout@v4 + - name: Use .NET Core SDK ${{ env.dotnetSdkVersion }} + uses: actions/setup-dotnet@v4 + with: + dotnet-version: ${{ env.dotnetSdkVersion }} + - name: Run kql validation tests + run: dotnet test .script/tests/KqlvalidationsTests/Kqlvalidations.Tests.csproj --configuration ${{ env.buildConfiguration }} + env: + GITHUBAPPID: ${{ env.GitHubAppID }} + GITHUBAPPINSTALLATIONID: ${{ env.GitHubAppInstallationID }} + GITHUBAPPPRIVATEKEY: ${{ env.GitHubAppPrivateKey }} + \ No newline at end of file From d1c324c7b8aff366cbdd3ef342021982aa17b55f Mon Sep 17 00:00:00 2001 From: rahul0216 Date: Thu, 21 Nov 2024 23:30:25 +0530 Subject: [PATCH 5/6] Update kql-validations.yaml --- .github/workflows/kql-validations.yaml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/kql-validations.yaml b/.github/workflows/kql-validations.yaml index f0b572ae071..498df86c569 100644 --- a/.github/workflows/kql-validations.yaml +++ b/.github/workflows/kql-validations.yaml @@ -1,5 +1,5 @@ -name: Detection Validations -run-name: Detection Validations running on ${{ github.ref_name }} +name: KQL Validations +run-name: KQL Validations running on ${{ github.ref_name }} on: pull_request: branches: @@ -19,7 +19,7 @@ jobs: uses: actions/setup-dotnet@v4 with: dotnet-version: ${{ env.dotnetSdkVersion }} - - name: Run kql validation tests + - name: Run KQL Validation tests run: dotnet test .script/tests/KqlvalidationsTests/Kqlvalidations.Tests.csproj --configuration ${{ env.buildConfiguration }} env: GITHUBAPPID: ${{ env.GitHubAppID }} From 31808619aef9095fd92ec485447daf7df47eba1a Mon Sep 17 00:00:00 2001 From: rahul0216 Date: Fri, 22 Nov 2024 00:07:30 +0530 Subject: [PATCH 6/6] Update kql-validations.yaml --- .github/workflows/kql-validations.yaml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/kql-validations.yaml b/.github/workflows/kql-validations.yaml index 498df86c569..bda60a14ce4 100644 --- a/.github/workflows/kql-validations.yaml +++ b/.github/workflows/kql-validations.yaml @@ -22,7 +22,7 @@ jobs: - name: Run KQL Validation tests run: dotnet test .script/tests/KqlvalidationsTests/Kqlvalidations.Tests.csproj --configuration ${{ env.buildConfiguration }} env: - GITHUBAPPID: ${{ env.GitHubAppID }} - GITHUBAPPINSTALLATIONID: ${{ env.GitHubAppInstallationID }} - GITHUBAPPPRIVATEKEY: ${{ env.GitHubAppPrivateKey }} + GITHUBAPPID: ${{ secrets.APPLICATION_ID }} + GITHUBAPPINSTALLATIONID: ${{ secrets.APPLICATION_INSTALLATION_ID }} + GITHUBAPPPRIVATEKEY: ${{ secrets.APPLICATION_PRIVATE_KEY }} \ No newline at end of file