Skip to content

Commit b8fd9e7

Browse files
Merge branch 'Azure:master' into feat-microsoft-defender-portal-compatability
2 parents ddb7f39 + 9774a18 commit b8fd9e7

3,372 files changed

Lines changed: 415871 additions & 283933 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/copilot-instructions.md

Lines changed: 89 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,18 @@ When reviewing pull requests, follow these rules strictly.
5959
3. Validate parser syntax, KQL accuracy, YAML structure, and all required fields from that custom instruction file
6060
4. Do NOT use general instructions for these files - only use the parsers custom instructions
6161

62+
### For Building, Packaging, or Validating Solutions
63+
When the user asks to **build**, **package**, **validate**, or **run validations** on a solution:
64+
1. **LOAD and USE:** `.github/instructions/packaging.instructions.md`
65+
2. Apply ALL guidelines from that file — it contains the script path, parameters, fuzzy matching behavior, and report display rules
66+
3. **Always use the build script** at `.script/local-validation/build-and-validate.ps1` — do NOT run validators manually or write your own validation logic
67+
4. **BEFORE running the script, tell the user:** "🔄 Running full build & validation suite for {SolutionName}. This typically takes 3-5 minutes — I'll present the complete report when it finishes." This message MUST appear in chat before the script executes so the user knows work is happening.
68+
5. **The script takes 3-10 minutes.** NEVER tell the user to "check the terminal."
69+
6. Present the full report — the text between `[REPORT_START]` and `[REPORT_END]` — in your chat response
70+
7. This applies to ALL solutions, including newly created ones that may not have a Package/ folder yet
71+
72+
**Trigger phrases:** "build solution", "package solution", "validate solution", "run validations", "run CI checks", "check if solution passes", "create V3 package"
73+
6274
---
6375

6476
## Files and folders to ignore
@@ -75,3 +87,80 @@ When working with the Solutions Analyzer tools in `Tools/Solutions Analyzer/`, f
7587

7688
- **`run-solution-analyzer`** — running the mapper, doc generator, ASIM browser, and `upload_to_kusto`; output locations; force-refresh and caching.
7789
- **`update-solution-analyzer`** — modifying scripts, updating `script-docs/`, README changelog rules, CSV output sync with `upload_to_kusto.py`, and static/interactive index plus markdown/HTML entity page synchronization.
90+
91+
**MANDATORY:** Before editing ANY file under `Tools/Solutions Analyzer/` — including small fixes such as renames, regex/pattern tweaks, escaping changes, override additions, or one-line behavior changes — first load `.github/skills/update-solution-analyzer/SKILL.md` and follow it. A `## Version History` changelog entry in `Tools/Solutions Analyzer/README.md` is **required for feature additions and behavior changes** (new features, changed analysis logic, new/renamed/removed CSV columns, parameter changes); pure bug fixes — such as typo corrections, crash fixes, escape/regex tweaks, or one-line fixes that restore intended behavior — may be logged at your discretion but are not required.
92+
93+
There are THREE different output scenarios - **never confuse them**:
94+
95+
1. **Default (development):** CSVs are written to `Tools/Solutions Analyzer/` in the current branch
96+
- This is the normal case when developing/testing
97+
- **Never generate documentation here**
98+
99+
2. **Output worktree (publishing CSVs):** `C:\Users\ofshezaf\GitHub\Azure-Sentinel-solution-analyzer-output\Tools\Solutions Analyzer`
100+
- Only use this when **specifically requested** to "publish CSVs to the output branch"
101+
- This is a separate git worktree for the CSV output branch
102+
- **Only CSVs go here, never documentation**
103+
104+
3. **Documentation output:** `C:\Users\ofshezaf\GitHub\sentinelninja\Solutions Docs`
105+
- This is where generated markdown documentation goes
106+
- This is in a **separate repository** (sentinelninja)
107+
- Empty the target folder before generating new docs
108+
109+
### Key Rules
110+
111+
- **Never generate docs locally** in the Azure-Sentinel repository
112+
- **Generate docs only in the sentinelninja repo** when asked or needed
113+
- **For official CSV releases**, generate CSVs **only** in the solution analyzer output worktree
114+
- Always use `--output-dir` flag when running `generate_connector_docs.py`
115+
116+
### Running Scripts
117+
118+
#### Mapper Script
119+
```powershell
120+
cd "Tools/Solutions Analyzer"
121+
python map_solutions_connectors_tables.py
122+
```
123+
124+
**Note:** Do NOT truncate or filter the output (e.g., do not pipe through `Select-Object`). The script prints timestamped progress messages to the console that the user needs to see. Run with `isBackground: false` and `timeout: 0` so the full output is visible.
125+
126+
#### Documentation Generator
127+
```powershell
128+
python generate_connector_docs.py --output-dir "C:\Users\ofshezaf\GitHub\sentinelninja\Solutions Docs" --skip-input-generation
129+
```
130+
131+
**IMPORTANT:** Never run without `--output-dir` flag.
132+
133+
**IMPORTANT:** Do NOT truncate or filter the output (e.g., do not pipe through `Select-Object`). Run with `isBackground: false` and `timeout: 0` so the full output is visible to the user.
134+
135+
**IMPORTANT:** Always use `--skip-input-generation` unless you specifically need to regenerate the input CSVs (mapper + collect_table_info). Without this flag, the doc generator will re-run those scripts automatically, which is slow and unnecessary if the CSVs are already up-to-date.
136+
137+
**IMPORTANT:** Run the mapper script before generating docs if:
138+
- The mapper script itself was modified, OR
139+
- Any override YAML file in the `overrides/` folder was modified (including adding, editing, or removing `additional_connectors` entries), OR
140+
- You specifically need to refresh the CSV data, OR
141+
- You are explicitly asked to run the mapper
142+
143+
### Caching and Logging
144+
145+
- **Cache:** `.cache/` folder for analysis caching
146+
- **Logs:** `.logs/` folder for log files
147+
148+
**Log file:** `Tools/Solutions Analyzer/.logs/map_solutions_connectors_tables.log`
149+
150+
Use `--force-refresh` with these types when modifying analysis logic:
151+
- `asim` - ASIM parser analysis
152+
- `parsers` - Non-ASIM parser analysis
153+
- `solutions` - Solution content analysis
154+
- `standalone` - Standalone content item analysis
155+
- `marketplace` - Marketplace availability check (requires network)
156+
- `tables` - Table reference info (requires network)
157+
158+
### Script Documentation
159+
160+
**Before updating a script:** Always review the relevant script documentation in `Tools/Solutions Analyzer/docs/` first.
161+
162+
**When updating a script**, update the corresponding script doc to reflect:
163+
- Any script parameters added or changed
164+
- Any output file changes, including changes to CSV files (new columns, renamed columns, removed columns)
165+
- Any changes to analysis methods or logic
166+
- Update the primary readme.md if needed and add the change to the change log. Do not add a version if the previous version as manifested by the changelog, was not committed yet.

0 commit comments

Comments
 (0)