From e7075ead8c74c6f025734a62d0cbad0bad69b028 Mon Sep 17 00:00:00 2001 From: Christian-Oliver Date: Mon, 5 May 2025 13:23:07 +0200 Subject: [PATCH 1/2] Added kalypso cli binary to gitignore; Added more documentation to the readme; Updated commander from version 8.2.0 to version 8.3.0 --- .gitignore | 3 +++ README.md | 13 +++++++++++++ package.json | 2 +- 3 files changed, 17 insertions(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index b64e014..a7acdb5 100644 --- a/.gitignore +++ b/.gitignore @@ -60,6 +60,9 @@ typings/ # next.js build output .next +#kalypso precompiled binary +kalypso-cli + dist/** ./output package-lock.json diff --git a/README.md b/README.md index d042dc2..4736dbf 100644 --- a/README.md +++ b/README.md @@ -18,6 +18,7 @@ curl -fsSL https://raw.githubusercontent.com/functional-team/kalypso-cli/refs/he ### Command line utility ```sh +# You may want to introduce the command kalypso-cli to your OS (e.g. in the PATH) Usage: kalypso-cli crawl [options] Crawl Azure Resources @@ -62,3 +63,15 @@ jq '.crawl.resources[] | {type}' resources.json | sort -u npm install --global xsea sudo npm run build && sudo npm run package ``` + +### Further development of the crawler + Feel free to fork our repository and contribute Pull Requests. + + To develop the crawler you need the following packages installed locally: + +- Node.js +- npm + + ``` + npm install commander --save + ``` diff --git a/package.json b/package.json index 0228acb..7a63896 100644 --- a/package.json +++ b/package.json @@ -62,7 +62,7 @@ "@types/jsonpath": "^0.2.4", "azure-kusto-data": "^5.2.3", "boxen": "^5.1.2", - "commander": "^8.2.0", + "commander": "^8.3.0", "jsonfile": "^6.1.0", "jsonpath": "^1.1.1", "kalypso-cli": "file:" From 73d26bb0cb27ad07732a7666a3ee84a456d09bb6 Mon Sep 17 00:00:00 2001 From: Christian-Oliver Date: Fri, 9 May 2025 13:58:51 +0200 Subject: [PATCH 2/2] docs: update README for developers guide and prerequisites; refactor AzureKustoClusterScanner to remove unnecessary property deletion of EntityName on Update Policies --- README.md | 10 +++++++--- src/lib/azure/AzureKustoClusterScanner.ts | 1 - 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 4736dbf..def5e99 100644 --- a/README.md +++ b/README.md @@ -53,7 +53,11 @@ Find elements in json. This example lists the types of resources found in the cl jq '.crawl.resources[] | {type}' resources.json | sort -u ``` -## Developer guide +## Developers guide + +### Needed packages +* `@azure/arm-resourcegraph` + ### Build precompiled binaries (experimental) @@ -64,7 +68,7 @@ jq '.crawl.resources[] | {type}' resources.json | sort -u sudo npm run build && sudo npm run package ``` -### Further development of the crawler +### Further development of the crawler - prerequisites Feel free to fork our repository and contribute Pull Requests. To develop the crawler you need the following packages installed locally: @@ -74,4 +78,4 @@ jq '.crawl.resources[] | {type}' resources.json | sort -u ``` npm install commander --save - ``` + ``` \ No newline at end of file diff --git a/src/lib/azure/AzureKustoClusterScanner.ts b/src/lib/azure/AzureKustoClusterScanner.ts index 9cc07c9..a5b0335 100644 --- a/src/lib/azure/AzureKustoClusterScanner.ts +++ b/src/lib/azure/AzureKustoClusterScanner.ts @@ -56,7 +56,6 @@ export async function AzureKustoClusterScanner(kustoclusterresource:any):Promise const policyrow = JSON.parse(JSON.stringify(policy)); const tablename = policyrow.EntityName.split(".")[1].replace("[", '').replace("]", '') delete policyrow["PolicyName"] - delete policyrow["EntityName"] delete policyrow["EntityType"] if (!(tablename in updatepolicies)) {updatepolicies[tablename] = []} updatepolicies[tablename].push(policyrow)