Skip to content

Add KB sidebar migration infrastructure with Access Analyzer pilot - #112

Merged
hilram7 merged 6 commits into
devfrom
kb-sidebar-autogen-all-products
Feb 5, 2026
Merged

Add KB sidebar migration infrastructure with Access Analyzer pilot#112
hilram7 merged 6 commits into
devfrom
kb-sidebar-autogen-all-products

Conversation

@hilram7

@hilram7hilram7 commented Feb 4, 2026

Copy link
Copy Markdown
Collaborator

Summary

Implements infrastructure for gradual migration of Knowledge Base sidebars from manual generateKBSidebar() to Docusaurus autogenerated sidebars. Access Analyzer (NAA) is included as the pilot product to demonstrate the new approach.

Problem Being Solved

Currently, KB articles use a manual sidebar generation function that:

  • Reads from docs/kb/[product]/ source directories
  • Generates sidebar items dynamically at build time
  • Links to separate KB route (/docs/kb/)

This creates maintenance challenges and inconsistent UX. The new approach:

  • Uses Docusaurus native autogenerated sidebars
  • Copies KB content to product version directories
  • Shows KB in product docs with icon grid category views
  • Enables better organization and discoverability

Changes Made

Infrastructure

  • Copy script enhancements: Added MIGRATED_PRODUCTS array to control gradual rollout
  • Migration control: Script only processes products in migration list, preventing duplicates
  • Generated-index support: Auto-adds icon grid views to all KB category pages
  • Unversioned product handling: Special handling for products with version: 'current'

Access Analyzer (Pilot Migration)

  • Migrated to autogenerated KB sidebars with icon grid category views
  • Added to MIGRATED_PRODUCTS list
  • Sidebar configs already use autogenerated method (no changes needed)

Source KB Improvements

  • Standardized KB labels across all products to "Knowledge Base"
  • Fixed category labels for: 1secure, auditor, changetracker, directorymanager, endpointpolicymanager
  • Improved Threat Prevention scripts documentation
  • Added recoveryforactivedirectory support

Testing

  • ✅ Local dev server: All products display correctly
  • ✅ Production build: Completes successfully without errors
  • ✅ Access Analyzer: Shows new icon grid KB, no duplicates
  • ✅ Other products: Continue using old method, working correctly
  • ✅ No KB duplication: Products not in migration list show only old method

Rollout Plan

  1. This PR: Merge infrastructure + Access Analyzer pilot
  2. Per-product PRs: Migrate remaining products individually (16 products)
    • Each PR: Update sidebar configs, add to MIGRATED_PRODUCTS
    • Each team approves only their own product migration
  3. Cleanup PR: After all products migrated, remove old generateKBSidebar.js

Note on 1secure Changes

This PR includes a minor, non-breaking label change to 1secure's KB category file as part of standardizing KB labels across all products. This is why @netwrix/1secure-docs is automatically added as a reviewer. The change does not affect 1secure's functionality or content, only improves label consistency.

Files Changed

  • scripts/copy-kb-to-versions.mjs: Migration control system
  • kb_allowlist.json: Generated file (tracks migrated products)
  • docs/kb/*/_category_.json: Label standardization (1secure, auditor, changetracker, directorymanager, endpointpolicymanager)
  • Deleted KB test folders from Phase 1 exploration

Hilary Ramirez added 5 commits February 3, 2026 15:59
- Add special handling for unversioned products (version:
'current') to copy KB to root level (docs/[product]/kb/) instead of /current/ folder
- Fixes: 1secure, endpointpolicymanager, endpointprotector,
privilegesecurediscovery
- Add recoveryforactivedirectory support with folder name mapping (recoveryad)
- Standardize KB labels to 'Knowledge
Base' across all products (directorymanager, auditor, changetracker, 1secure, endpointpolicymanager)
- Remove duplicate /current/kb/ folders for
unversioned products
- Add missing _category_.json to 1secure/setup-and-configuration for proper ordering
- Convert copy script from .js to
.mjs with ES modules
- Generate updated kb_allowlist.json with all 19 products
- Add tracking files for migration reference
(kb-categories-inventory.txt, kb-sidebars-to-migrate.txt)
- Update copy script to auto-generate category files with
generated-index configuration
- All KB category folders now display icon grid view when clicked (278 categories updated)
- Add
add-generated-index.mjs script for batch updating category files
- Improve Threat Prevention scripts README with prominent disclaimer and clear KB
article references
- Regenerate kb_allowlist.json with updated configuration
- Add MIGRATED_PRODUCTS array to copy script for gradual rollout
- Add accessanalyzer to migrated products list
- Remove KB folders from Phase 1 testing
- Script now only processes products in migration list
- Only Access Analyzer is migrated to new autogenerated KB
- Allowlist reflects products processed by copy script
Comment threadscripts/copy-kb-to-versions.mjs Fixed
- Use atomic 'wx' flag instead of check-then-write pattern
- Prevents theoretical race condition in category file generation
- No functional change, same behavior
- Resolves CodeQL security alert
@hilram7
hilram7 marked this pull request as ready for review February 5, 2026 00:31
@hilram7
hilram7 requested review from a team as code ownersFebruary 5, 2026 00:31
@hilram7

Copy link
Copy Markdown
CollaboratorAuthor

Hi @netwrix/1secure-docs and @netwrix/kb-docs,

I need approval for this script that will start implementing the KB sidebar persistence fix across products.

I made one small wording change to a sidebar label for 1Secure, so that is why this PR requires @netwrix/1secure-docs approval.

Let me know if you have any questions.

Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants

@hilram7@github-advanced-security@jake-mahon-netwrix@james-s-anderson