Skip to content

TEST ADCS update #1578

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 15 commits into from
Closed

TEST ADCS update #1578

wants to merge 15 commits into from

Conversation

JonasBK
Copy link
Contributor

@JonasBK JonasBK commented Jun 12, 2025

Description

Describe your changes in detail

Motivation and Context

Resolves <TICKET_OR_ISSUE_NUMBER>

Why is this change required? What problem does it solve?

How Has This Been Tested?

Please describe in detail how you tested your changes.
Include details of your testing environment, and the tests you ran to
see how your change affects other areas of the code, etc.

Screenshots (optional):

Types of changes

  • Chore (a change that does not modify the application functionality)
  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Database Migrations

Checklist:

Summary by CodeRabbit

  • New Features

    • Added detection and analysis for the ADCSESC16 Active Directory Certificate Services (ADCS) attack path, including new relationship types and properties.
    • Introduced new help text and instructional content in the UI for ADCSESC16, WriteAltSecurityIdentities, and WritePublicInformation relationships, with detailed abuse scenarios, operational security notes, and references.
    • Expanded edge types and schema support for new ADCS and object manipulation relationships.
  • Enhancements

    • Updated test harnesses and integration tests to cover new ADCS properties and relationships.
    • Improved property parsing for string lists and decimal values in graph data.
    • Extended Cypher test cases and UI schema to recognize and display new relationship kinds and properties.
  • Documentation

    • Added comprehensive help and reference materials for new privilege escalation scenarios in both Windows and Linux environments.
  • Style

    • Minor import order and formatting adjustments for code clarity and consistency.

@JonasBK JonasBK self-assigned this Jun 12, 2025
@JonasBK JonasBK added enhancement New feature or request external This pull request is from an external contributor labels Jun 12, 2025
Copy link
Contributor

coderabbitai bot commented Jun 12, 2025

Important

Review skipped

Draft detected.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Walkthrough

This update introduces the detection, analysis, and UI support for the ADCS ESC16 vulnerability in Active Directory environments. It adds new schema properties and relationship kinds, implements backend logic for ESC16 edge calculation and post-processing, and expands test harnesses and integration tests. The frontend gains explanatory help texts, abuse scenarios, and visualization support for ESC16 and related privilege relationships.

Changes

Files / Groups Change Summary
packages/go/analysis/ad/esc16.go New file implementing ESC16 detection, edge composition, and post-processing logic for ADCS.
cmd/api/src/analysis/ad/adcs_integration_test.go Added integration test for ESC16 processing and edge validation.
cmd/api/src/test/integration/harnesses.go
cmd/api/src/test/integration/harnesses/esc6a-eca.json
cmd/api/src/test/integration/harnesses/esc6a-template1.json
cmd/api/src/test/integration/harnesses/esc6a-template2.json
Added/updated IsUserSpecifiesSanEnabledCollected property in test harnesses and JSON fixtures.
cmd/api/src/test/integration/harnesses/ADCSESC16Harness.json New JSON fixture defining a graph for ESC16 integration testing.
packages/cue/bh/ad/ad.cue Added new schema properties and relationship kinds for ESC16 and advanced manipulations.
packages/go/analysis/ad/ad.go Added ESC16 handling to edge composition path function.
packages/go/analysis/ad/adcs.go Added ESC16 post-processing step for enterprise CAs with valid cert chains.
packages/go/analysis/ad/esc6.go Refactored ESC6a/ESC6b logic to rely on new collected property and simplified filtering.
packages/go/analysis/ad/post.go Registered ADCSESC16 as a post-processed relationship kind.
packages/go/cypher/test/cases/positive_tests.json Updated test to include new relationship types in Cypher query.
packages/go/ein/ad.go
packages/go/ein/incoming_models.go
Added parsing and model support for new CA registry properties.
packages/go/graphschema/ad/ad.go
packages/go/graphschema/common/common.go
Added new relationship kinds and properties to schema, parsing, and relationship lists.
packages/go/lab/loader.go Added support for new property value types and base entity kind assignment.
packages/javascript/bh-shared-ui/src/components/HelpTexts/ADCSESC16/* Added help text components for ESC16: general info, abuse scenarios, OPSEC, references, and composition.
packages/javascript/bh-shared-ui/src/components/HelpTexts/WriteAltSecurityIdentities/* Added help text components for WriteAltSecurityIdentities: general info, abuse, OPSEC, references.
packages/javascript/bh-shared-ui/src/components/HelpTexts/WritePublicInformation/* Added help text components for WritePublicInformation: general info, abuse, OPSEC, references.
packages/javascript/bh-shared-ui/src/components/HelpTexts/index.tsx Registered new help text components for ESC16 and advanced relationships.
packages/javascript/bh-shared-ui/src/edgeTypes.tsx Added new edge types for ESC16 and advanced manipulations.
packages/javascript/bh-shared-ui/src/graphSchema.ts Expanded enums and display mappings for new relationship kinds and properties.
packages/javascript/bh-shared-ui/src/views/TierManagement/* Minor import order and license header adjustments.

Sequence Diagram(s)

sequenceDiagram
    participant Test as Integration Test
    participant DB as Graph Database
    participant ADCS as ADCS Post-Processor
    participant ESC16 as ESC16 Logic

    Test->>DB: Load ADCSESC16Harness.json (without ESC16 edges)
    Test->>ADCS: Trigger post-processing for EnterpriseCA
    ADCS->>ESC16: PostADCSESC16(EnterpriseCA, Domains, Cache)
    ESC16->>DB: Analyze CA and CertTemplate properties
    ESC16->>DB: Traverse graph to find eligible users/groups
    ESC16->>DB: Create ADCSESC16 edges for valid paths
    Test->>DB: Query for ADCSESC16 edges
    Test->>Test: Assert edge count and correctness
Loading

Poem

((\
( -.-) A new edge appears, ESC16 in sight,
o_(")(") Certificates and chains, now tested right.
With properties and paths, the graph grows tall,
Help texts and queries—explaining it all!
The warren is safer, the schema more bright,
For every new edge, we hop with delight!


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Explain this complex logic.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai explain this code block.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and explain its main purpose.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR.
  • @coderabbitai generate sequence diagram to generate a sequence diagram of the changes in this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

@JonasBK
Copy link
Contributor Author

JonasBK commented Jun 12, 2025

@coderabbitai full review

@JonasBK JonasBK marked this pull request as draft June 12, 2025 10:01
Copy link
Contributor

coderabbitai bot commented Jun 12, 2025

✅ Actions performed

Full review triggered.

1 similar comment
Copy link
Contributor

coderabbitai bot commented Jun 12, 2025

✅ Actions performed

Full review triggered.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 12

🔭 Outside diff range comments (1)
packages/javascript/bh-shared-ui/src/components/HelpTexts/index.tsx (1)

260-277: 🛠️ Refactor suggestion

Edge registry growth – consider modularisation

EdgeInfoComponents is now ~280 lines long and growing. Continuing to append entries scales poorly and invites merge conflicts.

Suggestion: split into thematic maps (e.g. ADCS, AZ, Write*, etc.) and compose with Object.assign:

export default {
  ...ADCSEdges,
  ...WriteEdges,
  ...AzureEdges,
  // ...
} as const;
🧹 Nitpick comments (28)
packages/javascript/bh-shared-ui/src/edgeTypes.tsx (1)

92-101: Maintain alphabetical ordering for clarity

Within the “Advanced Object Manipulation” array, the new entries break the existing alphabetical order (WriteAccountRestrictions, WriteAltSecurityIdentities, WriteGPLink, WritePublicInformation, WriteSPN).
Keeping this list sorted makes future diffs easier to review.

-    ActiveDirectoryRelationshipKind.WriteAccountRestrictions,
-    ActiveDirectoryRelationshipKind.WriteAltSecurityIdentities,
-    ActiveDirectoryRelationshipKind.WriteGPLink,
-    ActiveDirectoryRelationshipKind.WritePublicInformation,
-    ActiveDirectoryRelationshipKind.WriteSPN,
+    ActiveDirectoryRelationshipKind.WriteAccountRestrictions,
+    ActiveDirectoryRelationshipKind.WriteAltSecurityIdentities,
+    ActiveDirectoryRelationshipKind.WriteGPLink,
+    ActiveDirectoryRelationshipKind.WritePublicInformation,
+    ActiveDirectoryRelationshipKind.WriteSPN,

(No functional change—pure readability.)

packages/javascript/bh-shared-ui/src/components/HelpTexts/ADCSESC16/References.tsx (2)

23-26: Optional: Enhance link security attributes
For added security and privacy, include noreferrer alongside noopener to prevent the new page from accessing the referrer:

- rel='noopener'
+ rel='noopener noreferrer'

Also applies to: 30-33, 37-40, 44-47, 51-54, 58-61


22-64: Optional: Use semantic list or Stack for spacing
Rather than inserting <br/> between links, consider using MUI’s <Stack spacing={1}> or a semantic <ul>/<li> pattern to manage spacing and improve accessibility:

- <Box sx={{ overflowX: 'auto' }}>
-   <Link ...>...</Link>
-   <br/>
-   <Link ...>...</Link>
+ <Stack direction="column" spacing={1} sx={{ overflowX: 'auto' }}>
+   {links.map(({ href, label }) => (
+     <Link key={href} href={href} target="_blank" rel="noopener noreferrer">
+       {label}
+     </Link>
+   ))}
packages/javascript/bh-shared-ui/src/components/HelpTexts/WritePublicInformation/Opsec.tsx (1)

22-30: Nitpick: Remove unnecessary fragment
The React fragment wrapping <Typography> is redundant. You can return the element directly:

-    return (
-        <>
-            <Typography variant='body2'>…</Typography>
-        </>
-    );
+    return <Typography variant='body2'>…</Typography>;
packages/javascript/bh-shared-ui/src/components/HelpTexts/WriteAltSecurityIdentities/Opsec.tsx (2)

20-30: Remove redundant fragment wrapper
Since the component returns only a single <Typography> element, the <>…</> wrapper is unnecessary. Simplify to:

-    return (
-        <>
-            <Typography variant="body2">
-                …text…
-            </Typography>
-        </>
-    );
+    return (
+        <Typography variant="body2">
+            …text…
+        </Typography>
+    );

23-24: Use double quotes for JSX props
For consistency with typical JSX conventions, change variant='body2' to variant="body2".

cmd/api/src/test/integration/harnesses.go (1)

3615-3617: Repetitive property-setting boilerplate – extract a helper

Each harness now repeats the same two-line pattern to flag SAN collection.
A tiny helper would de-duplicate ~15 lines, improve readability, and reduce future merge noise.

Example:

func markSANCollected(ca *graph.Node, enabled bool) {
    ca.Properties.Set(ad.IsUserSpecifiesSanEnabledCollected.String(), true)
    ca.Properties.Set(ad.IsUserSpecifiesSanEnabled.String(), enabled)
}

Then replace the two setters with markSANCollected(s.EnterpriseCA1, true/false).

Also applies to: 5069-5071, 5187-5189, 5481-5483

packages/javascript/bh-shared-ui/src/components/HelpTexts/ADCSESC16/ADCSESC16.tsx (1)

24-31: Consider freezing the descriptor object

ADCSESC16 is effectively a constant lookup table – declaring it with as const (or readonly Record type) prevents accidental mutation and gives the compiler stricter exhaustiveness checks.

-const ADCSESC16 = {
+const ADCSESC16 = {
     general: General,
     windowsAbuse: WindowsAbuse,
     linuxAbuse: LinuxAbuse,
     opsec: Opsec,
     references: References,
     composition: Composition,
-};
+} as const;
packages/javascript/bh-shared-ui/src/components/HelpTexts/index.tsx (1)

22-23: Import placement is slightly off-alphabetical

Imports in this block appear to be sorted numerically/alphabetically; inserting ADCSESC16 after ADCSESC13 keeps numeric order but breaks lexical ordering (13 < 16, so fine) – no functional issue, just mentioning for consistency.

packages/javascript/bh-shared-ui/src/components/HelpTexts/WriteAltSecurityIdentities/References.tsx (1)

20-96: UI readability nitpick

Using <br /> repeatedly produces uneven spacing. Consider a <Stack> or <List> for semantic grouping and automatic spacing.

-<Box sx={{ overflowX: 'auto' }}>
+<Stack sx={{ overflowX: 'auto' }} spacing={1}>
   ...
-</Box>
+</Stack>
packages/go/graphschema/common/common.go (1)

43-47: Consider auto-generating the ever-growing kind slices

InboundRelationshipKinds / OutboundRelationshipKinds keep being manually appended (now with ADCSESC16, WriteAltSecurityIdentities, WritePublicInformation).
A generated map or a small unit-test asserting uniqueness would prevent accidental duplicates and shorten future diffs.

packages/javascript/bh-shared-ui/src/components/HelpTexts/WritePublicInformation/References.tsx (1)

23-95: Add noreferrer to external links

Every <Link> opens a new tab with target="_blank" but only sets rel="noopener".
Missing noreferrer breaks the recommendation against reverse-tab-nabbing in some security guides.

-<Link target='_blank' rel='noopener' href='https://attack.mitre.org/techniques/T1098/'>
+<Link target='_blank' rel='noopener noreferrer' href='https://attack.mitre.org/techniques/T1098/'>

Apply the same addition to every link in the component.

packages/go/lab/loader.go (1)

166-185: Gracefully handle empty STRLIST: and tighten decimal parsing

  1. STRLIST: with no elements currently returns []string{""}.
    Trim the prefix first and check for empty string.

  2. DECIMAL: silently accepts NaN, Inf, etc. Consider validating with math.IsFinite (Go 1.22) or a simple range check if those values would break the DB layer.

packages/javascript/bh-shared-ui/src/components/HelpTexts/ADCSESC16/General.tsx (1)

25-37: Add missing verbs & fix minor grammar issues

Two small omissions make the text read awkwardly:

  1. “… source the privileges to perform …” → should read “source has the privileges…”.
  2. “This setup allow an attacker…” → should be “allows”.
-                {groupSpecialFormat(sourceType, sourceName)} the privileges to perform the ADCS ESC16 attack against the
+                {groupSpecialFormat(sourceType, sourceName)} **has** the privileges to perform the ADCS ESC16 attack against the
@@
-                any published certificate template. Also, the CA has the SID security extension disabled. This setup
-                allow an attacker principal to obtain a malicious certificate as any AD forest user or computer and use
+                any published certificate template. Also, the CA has the SID security extension disabled. This setup
+                **allows** an attacker principal to obtain a malicious certificate as any AD forest user or computer and use
packages/javascript/bh-shared-ui/src/components/HelpTexts/ADCSESC16/Composition.tsx (1)

38-44: UX: Add empty-state message

When nodesArray is empty the list renders nothing, leaving users wondering if loading failed. Consider a short placeholder:

-                ) : (
-                    <VirtualizedNodeList nodes={nodesArray} />
+                ) : nodesArray.length === 0 ? (
+                    <Typography variant="body2" color="text.secondary">
+                        No composition items were found for this edge.
+                    </Typography>
+                ) : (
+                    <VirtualizedNodeList nodes={nodesArray} />
                 )}
packages/javascript/bh-shared-ui/src/components/HelpTexts/WriteAltSecurityIdentities/General.tsx (1)

25-28: Sentence missing a verb

Add “has” to keep the sentence grammatical.

-                {groupSpecialFormat(sourceType, sourceName)} the ability to write to the AltSecurityIdentities attribute
+                {groupSpecialFormat(sourceType, sourceName)} **has** the ability to write to the AltSecurityIdentities attribute
packages/javascript/bh-shared-ui/src/components/HelpTexts/ADCSESC16/LinuxAbuse.tsx (1)

49-50: Maintain formatting consistency for code blocks

Step 2 shows a raw <pre> block while the rest uses CodeController, leading to inconsistent styling (copy-buttons, syntax colours, etc.).

-            <Typography component={'pre'}>{'certipy auth -pfx administrator.pfx -dc-ip 172.16.126.128'}</Typography>
+            <CodeController>
+{`certipy auth -pfx administrator.pfx -dc-ip 172.16.126.128`}
+</CodeController>
packages/javascript/bh-shared-ui/src/components/HelpTexts/WritePublicInformation/General.tsx (1)

31-35: Improve grammatical flow and semantic HTML.
The sentence structure is a bit awkward and <i> isn’t semantic for emphasis. Consider this diff:

-            <Typography variant='body2'>
-                The Public-Information property set includes the altSecurityIdentities attribute allows you to specify{' '}
-                <i>explicit certificate mappings</i> for a principal. An explicit certificate mapping is a reference to
-                a certificate, which can be used to authenticate as the principal.
-            </Typography>
+            <Typography variant='body2'>
+                The Public-Information property set, which includes the <code>altSecurityIdentities</code> attribute,
+                allows you to specify <em>explicit certificate mappings</em> for a principal. An explicit certificate
+                mapping is a reference to a certificate, which can be used to authenticate as the principal.
+            </Typography>

This adds commas for clarity, wraps the attribute in <code>, and uses <em> for semantic emphasis.

cmd/api/src/analysis/ad/adcs_integration_test.go (1)

3676-3685: Drop the nested read-only transaction

Wrapping graphDB.ReadTransaction inside another ReadTransaction adds no value, obscures the intent, and may dead-lock on some drivers.

-err = graphDB.ReadTransaction(testCtx.Context(), func(tx graph.Transaction) error {
-    if err = graphDB.ReadTransaction(context.Background(), func(tx graph.Transaction) error {
-        ...
-    }); err != nil {
-        ...
-    }
-    return nil
-})
+err = graphDB.ReadTransaction(testCtx.Context(), func(tx graph.Transaction) error {
+    ...
+    return nil
+})
packages/javascript/bh-shared-ui/src/components/HelpTexts/WriteAltSecurityIdentities/LinuxAbuse.tsx (2)

34-40: Minor wording & nesting nits

Typo and invalid HTML nesting:

  1. “The certificate must meet the following requirements”.
  2. <p> tags inside a <Typography> (which itself renders a <p>) violate HTML-spec; browsers forgive it but React DevTools will warn.
    Use Typography component="div" or drop the inner <p>.
-<Typography variant='body2'>
-    The certificate must the following requirements:
+<Typography variant='body2' component='div'>
+    The certificate must meet the following requirements:

Same applies to the later “Verify the that mapping” line – drop the extra the.

Also applies to: 102-103


22-22: Unused props – add placeholder to keep TS happy

The component is typed as FC<EdgeInfoProps> but doesn’t accept a param.
While structurally assignable, enabling strictFunctionTypes will flag this.
Recommend accepting but ignoring the props:

-const LinuxAbuse: FC<EdgeInfoProps> = () => {
+const LinuxAbuse: FC<EdgeInfoProps> = (_props) => {
packages/javascript/bh-shared-ui/src/components/HelpTexts/WriteAltSecurityIdentities/WindowsAbuse.tsx (2)

34-40: Duplicate wording issues (same as Linux variant)

“must the following requirements” → “must meet …”.
Also remove nested <p> inside <Typography> as noted earlier.

Refactor once and reuse between Windows/Linux variants to avoid copy-paste drift.

Also applies to: 110-111


22-22: Accept but ignore props to silence strictFunctionTypes

Same as Linux file.

-const WindowsAbuse: FC<EdgeInfoProps> = () => {
+const WindowsAbuse: FC<EdgeInfoProps> = (_props) => {
packages/javascript/bh-shared-ui/src/components/HelpTexts/WritePublicInformation/LinuxAbuse.tsx (2)

34-40: Replicate wording / HTML fixes

The issues called out in the AltSecurityIdentities Linux file also exist here.
Please apply the same corrections.

Also applies to: 102-103


22-22: Props unused

Same fix as other files.

packages/javascript/bh-shared-ui/src/components/HelpTexts/WritePublicInformation/WindowsAbuse.tsx (2)

34-40: Wording / HTML duplication

See previous comments – identical corrections needed here.

Also applies to: 110-111


22-22: Props unused

Same fix.

packages/go/graphschema/ad/ad.go (1)

263-271: Properties list updated but consider ordering for diff hygiene.

RPCEncryption* and DisabledExtensions* are appended to the very end of AllProperties().
Keeping alphabetical order makes future diffs smaller and helps readers locate fields quickly.

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 0762b6e and b730fde.

⛔ Files ignored due to path filters (3)
  • cmd/api/src/test/integration/harnesses/esc6a-eca.svg is excluded by !**/*.svg
  • cmd/api/src/test/integration/harnesses/esc6a-template1.svg is excluded by !**/*.svg
  • cmd/api/src/test/integration/harnesses/esc6a-template2.svg is excluded by !**/*.svg
📒 Files selected for processing (47)
  • cmd/api/src/analysis/ad/adcs_integration_test.go (2 hunks)
  • cmd/api/src/test/integration/harnesses.go (7 hunks)
  • cmd/api/src/test/integration/harnesses/ADCSESC16Harness.json (1 hunks)
  • cmd/api/src/test/integration/harnesses/esc6a-eca.json (5 hunks)
  • cmd/api/src/test/integration/harnesses/esc6a-template1.json (1 hunks)
  • cmd/api/src/test/integration/harnesses/esc6a-template2.json (1 hunks)
  • packages/cue/bh/ad/ad.cue (10 hunks)
  • packages/go/analysis/ad/ad.go (1 hunks)
  • packages/go/analysis/ad/adcs.go (1 hunks)
  • packages/go/analysis/ad/esc16.go (1 hunks)
  • packages/go/analysis/ad/esc6.go (1 hunks)
  • packages/go/analysis/ad/post.go (1 hunks)
  • packages/go/cypher/test/cases/positive_tests.json (1 hunks)
  • packages/go/ein/ad.go (1 hunks)
  • packages/go/ein/incoming_models.go (1 hunks)
  • packages/go/graphschema/ad/ad.go (7 hunks)
  • packages/go/graphschema/common/common.go (1 hunks)
  • packages/go/lab/loader.go (3 hunks)
  • packages/javascript/bh-shared-ui/src/components/HelpTexts/ADCSESC16/ADCSESC16.tsx (1 hunks)
  • packages/javascript/bh-shared-ui/src/components/HelpTexts/ADCSESC16/Composition.tsx (1 hunks)
  • packages/javascript/bh-shared-ui/src/components/HelpTexts/ADCSESC16/General.tsx (1 hunks)
  • packages/javascript/bh-shared-ui/src/components/HelpTexts/ADCSESC16/LinuxAbuse.tsx (1 hunks)
  • packages/javascript/bh-shared-ui/src/components/HelpTexts/ADCSESC16/Opsec.tsx (1 hunks)
  • packages/javascript/bh-shared-ui/src/components/HelpTexts/ADCSESC16/References.tsx (1 hunks)
  • packages/javascript/bh-shared-ui/src/components/HelpTexts/ADCSESC16/WindowsAbuse.tsx (1 hunks)
  • packages/javascript/bh-shared-ui/src/components/HelpTexts/WriteAltSecurityIdentities/General.tsx (1 hunks)
  • packages/javascript/bh-shared-ui/src/components/HelpTexts/WriteAltSecurityIdentities/LinuxAbuse.tsx (1 hunks)
  • packages/javascript/bh-shared-ui/src/components/HelpTexts/WriteAltSecurityIdentities/Opsec.tsx (1 hunks)
  • packages/javascript/bh-shared-ui/src/components/HelpTexts/WriteAltSecurityIdentities/References.tsx (1 hunks)
  • packages/javascript/bh-shared-ui/src/components/HelpTexts/WriteAltSecurityIdentities/WindowsAbuse.tsx (1 hunks)
  • packages/javascript/bh-shared-ui/src/components/HelpTexts/WriteAltSecurityIdentities/WriteAltSecurityIdentities.tsx (1 hunks)
  • packages/javascript/bh-shared-ui/src/components/HelpTexts/WritePublicInformation/General.tsx (1 hunks)
  • packages/javascript/bh-shared-ui/src/components/HelpTexts/WritePublicInformation/LinuxAbuse.tsx (1 hunks)
  • packages/javascript/bh-shared-ui/src/components/HelpTexts/WritePublicInformation/Opsec.tsx (1 hunks)
  • packages/javascript/bh-shared-ui/src/components/HelpTexts/WritePublicInformation/References.tsx (1 hunks)
  • packages/javascript/bh-shared-ui/src/components/HelpTexts/WritePublicInformation/WindowsAbuse.tsx (1 hunks)
  • packages/javascript/bh-shared-ui/src/components/HelpTexts/WritePublicInformation/WritePublicInformation.tsx (1 hunks)
  • packages/javascript/bh-shared-ui/src/components/HelpTexts/index.tsx (4 hunks)
  • packages/javascript/bh-shared-ui/src/edgeTypes.tsx (2 hunks)
  • packages/javascript/bh-shared-ui/src/graphSchema.ts (9 hunks)
  • packages/javascript/bh-shared-ui/src/views/TierManagement/Details/Details.tsx (1 hunks)
  • packages/javascript/bh-shared-ui/src/views/TierManagement/Details/DetailsList.tsx (1 hunks)
  • packages/javascript/bh-shared-ui/src/views/TierManagement/Details/EntityInfo/SelectorList.tsx (1 hunks)
  • packages/javascript/bh-shared-ui/src/views/TierManagement/Details/MembersList.tsx (1 hunks)
  • packages/javascript/bh-shared-ui/src/views/TierManagement/Details/utils.tsx (0 hunks)
  • packages/javascript/bh-shared-ui/src/views/TierManagement/Summary/SummaryList.tsx (1 hunks)
  • packages/javascript/bh-shared-ui/src/views/TierManagement/TierManagement.tsx (1 hunks)
💤 Files with no reviewable changes (1)
  • packages/javascript/bh-shared-ui/src/views/TierManagement/Details/utils.tsx
🧰 Additional context used
🧬 Code Graph Analysis (17)
packages/go/analysis/ad/post.go (1)
packages/go/graphschema/ad/ad.go (1)
  • ADCSESC16 (114-114)
packages/go/ein/incoming_models.go (1)
packages/go/graphschema/ad/ad.go (4)
  • IsUserSpecifiesSanEnabled (141-141)
  • RoleSeparationEnabled (143-143)
  • RPCEncryptionEnforced (263-263)
  • DisabledExtensions (265-265)
packages/javascript/bh-shared-ui/src/components/HelpTexts/index.tsx (1)
packages/go/graphschema/ad/ad.go (3)
  • ADCSESC16 (114-114)
  • WriteAltSecurityIdentities (125-125)
  • WritePublicInformation (126-126)
packages/javascript/bh-shared-ui/src/components/HelpTexts/WritePublicInformation/WritePublicInformation.tsx (1)
packages/go/graphschema/ad/ad.go (1)
  • WritePublicInformation (126-126)
packages/javascript/bh-shared-ui/src/components/HelpTexts/ADCSESC16/ADCSESC16.tsx (1)
packages/go/graphschema/ad/ad.go (1)
  • ADCSESC16 (114-114)
packages/go/lab/loader.go (2)
packages/go/dawgs/graph/kind.go (1)
  • StringsToKinds (154-162)
packages/go/graphschema/ad/ad.go (2)
  • NodeKinds (1134-1136)
  • Entity (28-28)
packages/javascript/bh-shared-ui/src/components/HelpTexts/WriteAltSecurityIdentities/General.tsx (1)
packages/javascript/bh-shared-ui/src/components/HelpTexts/index.tsx (1)
  • EdgeInfoProps (142-151)
packages/go/analysis/ad/ad.go (2)
packages/go/graphschema/ad/ad.go (1)
  • ADCSESC16 (114-114)
packages/go/analysis/ad/esc16.go (1)
  • GetADCSESC16EdgeComposition (110-231)
packages/javascript/bh-shared-ui/src/components/HelpTexts/WriteAltSecurityIdentities/WriteAltSecurityIdentities.tsx (1)
packages/go/graphschema/ad/ad.go (1)
  • WriteAltSecurityIdentities (125-125)
packages/javascript/bh-shared-ui/src/components/HelpTexts/ADCSESC16/General.tsx (1)
packages/javascript/bh-shared-ui/src/components/HelpTexts/index.tsx (1)
  • EdgeInfoProps (142-151)
packages/go/ein/ad.go (2)
packages/go/ein/incoming_models.go (3)
  • CARegistryData (148-155)
  • RPCEncryptionEnforced (138-141)
  • DisabledExtensions (143-146)
packages/go/graphschema/ad/ad.go (2)
  • RPCEncryptionEnforced (263-263)
  • DisabledExtensions (265-265)
packages/javascript/bh-shared-ui/src/components/HelpTexts/WritePublicInformation/General.tsx (1)
packages/javascript/bh-shared-ui/src/components/HelpTexts/index.tsx (1)
  • EdgeInfoProps (142-151)
packages/javascript/bh-shared-ui/src/components/HelpTexts/WriteAltSecurityIdentities/LinuxAbuse.tsx (1)
packages/javascript/bh-shared-ui/src/components/HelpTexts/index.tsx (1)
  • EdgeInfoProps (142-151)
packages/javascript/bh-shared-ui/src/components/HelpTexts/WritePublicInformation/LinuxAbuse.tsx (1)
packages/javascript/bh-shared-ui/src/components/HelpTexts/index.tsx (1)
  • EdgeInfoProps (142-151)
packages/javascript/bh-shared-ui/src/components/HelpTexts/WritePublicInformation/WindowsAbuse.tsx (1)
packages/javascript/bh-shared-ui/src/components/HelpTexts/index.tsx (1)
  • EdgeInfoProps (142-151)
packages/javascript/bh-shared-ui/src/components/HelpTexts/WriteAltSecurityIdentities/WindowsAbuse.tsx (1)
packages/javascript/bh-shared-ui/src/components/HelpTexts/index.tsx (1)
  • EdgeInfoProps (142-151)
packages/go/graphschema/ad/ad.go (2)
packages/go/dawgs/graph/kind.go (1)
  • StringKind (145-152)
packages/go/ein/incoming_models.go (2)
  • RPCEncryptionEnforced (138-141)
  • DisabledExtensions (143-146)
🪛 Gitleaks (8.26.0)
packages/javascript/bh-shared-ui/src/components/HelpTexts/WriteAltSecurityIdentities/LinuxAbuse.tsx

99-99: Detected a Generic API Key, potentially exposing access to various services and sensitive operations.

(generic-api-key)


121-121: Detected a Generic API Key, potentially exposing access to various services and sensitive operations.

(generic-api-key)

packages/javascript/bh-shared-ui/src/components/HelpTexts/WritePublicInformation/WindowsAbuse.tsx

99-99: Detected a Generic API Key, potentially exposing access to various services and sensitive operations.

(generic-api-key)


121-121: Detected a Generic API Key, potentially exposing access to various services and sensitive operations.

(generic-api-key)

packages/javascript/bh-shared-ui/src/components/HelpTexts/WriteAltSecurityIdentities/WindowsAbuse.tsx

107-107: Detected a Generic API Key, potentially exposing access to various services and sensitive operations.

(generic-api-key)


129-129: Detected a Generic API Key, potentially exposing access to various services and sensitive operations.

(generic-api-key)

🪛 golangci-lint (1.64.8)
cmd/api/src/analysis/ad/adcs_integration_test.go

[error] 30-30: ST1019(related information): other import of "github.com/specterops/bloodhound/graphschema"

(stylecheck)

🔇 Additional comments (35)
packages/javascript/bh-shared-ui/src/views/TierManagement/Summary/SummaryList.tsx (1)

1-15: License header addition
The new Apache 2.0 license header with SPDX identifier is correctly added. Ensure the wording and formatting are consistent with other files in the codebase (e.g., inclusion of “(the "License")” suffix if that’s your standard).

packages/javascript/bh-shared-ui/src/views/TierManagement/TierManagement.tsx (1)

22-33: Import-order tweak LGTM

Pure re-ordering of route constants improves grouping consistency without altering behavior. No action needed.

cmd/api/src/test/integration/harnesses/esc6a-template2.json (1)

113-113: Test harness update: SAN collection flag added.

The new "IsUserSpecifiesSanEnabledCollected": "True" property on the EnterpriseCA node aligns with other ESC6a templates and supports the updated post-processing logic.

packages/javascript/bh-shared-ui/src/views/TierManagement/Details/Details.tsx (1)

24-24: Import reorder: TierActionBar moved for consistency.

The TierActionBar import has been repositioned to group related fragments together, matching the import ordering patterns used elsewhere in this module.

cmd/api/src/test/integration/harnesses/esc6a-template1.json (1)

113-113: Test harness update: SAN collection flag added.

Adding "IsUserSpecifiesSanEnabledCollected": "True" on the EnterpriseCA node maintains consistency across ESC6a templates and ensures test data supports the new analysis logic.

packages/javascript/bh-shared-ui/src/views/TierManagement/Details/EntityInfo/SelectorList.tsx (1)

23-23: Consolidate imports from utils.

Combining getTagUrlValue and itemSkeletons into a single import from ../../utils simplifies the code without affecting functionality.

packages/javascript/bh-shared-ui/src/views/TierManagement/Details/DetailsList.tsx (1)

31-31: Adjusted import grouping for utilities.

Swapping the relative import order to bring itemSkeletons before SelectedHighlight/getListHeight keeps related utilities organized together.

packages/javascript/bh-shared-ui/src/views/TierManagement/Details/MembersList.tsx (1)

27-29: Verify relocated helper import

SelectedHighlight and getListHeight have been moved from ../utils to ./utils.
Double-check that:

  1. ./utils/index.ts (or equiv.) actually re-exports both symbols.
  2. The previous ../utils export has been removed to avoid duplicate definitions.

If either is missing, the TS build will fail at compile time.

packages/go/analysis/ad/ad.go (1)

574-576: ESC16 case wired correctly

The new switch branch cleanly delegates to GetADCSESC16EdgeComposition, matching the pattern used for ESC1/3/4/6/9/10/13. No issues spotted.

packages/go/analysis/ad/post.go (1)

55-60: Relationship list updated

ad.ADCSESC16 is now part of PostProcessedRelationships(), ensuring it’s included in post-processing orchestration. Looks good.

packages/javascript/bh-shared-ui/src/edgeTypes.tsx (1)

104-118: Edge kind added – confirm schema export

ActiveDirectoryRelationshipKind.ADCSESC16 enters the ADCS bucket. Ensure the enum value is exported from graphSchema.ts (the import at line 17) and that all consumer code paths (filters, legend, help text mapping) are updated; otherwise the UI may blow up at runtime.

cmd/api/src/test/integration/harnesses/esc6a-eca.json (1)

128-134: Property naming consistency

"IsUserSpecifiesSanEnabledCollected" is introduced alongside the existing "IsUserSpecifiesSanEnabled".
Confirm the parser expects this exact camel-cased key; a typo or case mismatch will silently skip the value in Go’s struct tags.

Also, all values are string literals "True"/"False", matching the surrounding convention—so no action needed on typing.

Also applies to: 228-232, 325-331, 427-433, 527-533

packages/javascript/bh-shared-ui/src/components/HelpTexts/ADCSESC16/References.tsx (1)

20-66: Approve: References component implementation
The component correctly renders a horizontally scrollable container with the curated list of static links.

packages/javascript/bh-shared-ui/src/components/HelpTexts/WritePublicInformation/WritePublicInformation.tsx (1)

23-31: Approve: Aggregation object for WritePublicInformation
This mapping cleanly aggregates all subcomponents for the WritePublicInformation help text set.

packages/javascript/bh-shared-ui/src/components/HelpTexts/WritePublicInformation/Opsec.tsx (1)

20-31: Approve: Opsec component content
The operational security guidance is accurate and the Typography usage aligns with design guidelines.

packages/go/ein/ad.go (1)

1167-1175: Approve: ParseCARegistryProperties extended
The addition of RPCEncryptionEnforced and DisabledExtensions follows the existing pattern and correctly populates the property map when collected.

packages/javascript/bh-shared-ui/src/components/HelpTexts/WriteAltSecurityIdentities/WriteAltSecurityIdentities.tsx (1)

23-31: Approve: Aggregation object for WriteAltSecurityIdentities
The component correctly imports and aggregates all subcomponents for the WriteAltSecurityIdentities help text set.

packages/go/cypher/test/cases/positive_tests.json (1)

693-699:

✅ Verification successful

Test updated to include new ADCS relationship types
The extended relationship list now includes ADCSESC16, WriteAltSecurityIdentities, and WritePublicInformation, which aligns with the schema and analysis logic additions. Ensure these kinds are correctly registered in the graph schema and parser.

Run this to verify registration in your Go schema packages:


🏁 Script executed:

#!/bin/bash
# Verify new relationship kinds are present in graphschema
rg -nE '(ADCSESC16|WriteAltSecurityIdentities|WritePublicInformation)' packages/go/graphschema

Length of output: 195


Let's try a fixed-string search to avoid the regex parsing error:


🏁 Script executed:

#!/bin/bash
# Search for new relationship kinds in graphschema using fixed strings
rg -nF -e ADCSESC16 -e WriteAltSecurityIdentities -e WritePublicInformation packages/go/graphschema

Length of output: 8697


Approved: New ADCS relationship types registered in graphschema
The constants ADCSESC16, WriteAltSecurityIdentities, and WritePublicInformation are defined in packages/go/graphschema/ad/ad.go and included in all relevant []graph.Kind return lists. No further changes required.

packages/javascript/bh-shared-ui/src/components/HelpTexts/WriteAltSecurityIdentities/Opsec.tsx (1)

1-16: License header and SPDX tag are correctly applied
The Apache-2.0 header and SPDX identifier conform to project standards.

cmd/api/src/test/integration/harnesses.go (1)

5359-5363:

❓ Verification inconclusive

Comment/doc inconsistency – CA1 IsUserSpecifiesSanEnabled is not left nil

The inline comment says the property should remain unset, yet the very next lines explicitly set it to false.
This breaks the intended test scenario and can hide bugs that rely on the nil (vs false) distinction.

-// leave ca1 isUserSpecifiesSanEnabled as nil
 s.EnterpriseCA1 = graphTestContext.NewActiveDirectoryEnterpriseCA("EnterpriseCA1", domainSid1)
-s.EnterpriseCA1.Properties.Set(ad.IsUserSpecifiesSanEnabledCollected.String(), true)
-s.EnterpriseCA1.Properties.Set(ad.IsUserSpecifiesSanEnabled.String(), false)
+# Keep IsUserSpecifiesSanEnabled unset (nil) – only mark it as collected
+s.EnterpriseCA1.Properties.Set(ad.IsUserSpecifiesSanEnabledCollected.String(), true)

Verify whether the test logic actually needs the property to be nil or false, then adjust either the comment or the code accordingly.


Mismatch between inline comment and code for IsUserSpecifiesSanEnabled

The comment in cmd/api/src/test/integration/harnesses.go (lines 5359–5363) says to leave IsUserSpecifiesSanEnabled unset, but the code immediately marks it collected and sets it to false. Please confirm which behavior is intended:

  • If the test should treat the flag as unset (nil), remove the .Set(ad.IsUserSpecifiesSanEnabled.String(), false) call.
  • If the test should explicitly set it to false, update the inline comment to reflect that.

File: cmd/api/src/test/integration/harnesses.go
Lines: 5359–5363

- // leave ca1 isUserSpecifiesSanEnabled as nil
  s.EnterpriseCA1 = graphTestContext.NewActiveDirectoryEnterpriseCA("EnterpriseCA1", domainSid1)
  s.EnterpriseCA1.Properties.Set(ad.IsUserSpecifiesSanEnabledCollected.String(), true)
- s.EnterpriseCA1.Properties.Set(ad.IsUserSpecifiesSanEnabled.String(), false)
+ // (adjusted to either remove this line to leave nil or update the comment to explain it’s explicitly set false)
packages/javascript/bh-shared-ui/src/components/HelpTexts/ADCSESC16/Opsec.tsx (1)

20-29: Component looks good – no action required

The functional component is concise, uses FC typing, and applies MUI correctly.
No correctness, security, or styling issues spotted.

packages/javascript/bh-shared-ui/src/components/HelpTexts/index.tsx (1)

131-140: Security nitpick: missing noreferrer on external links

For WriteAltSecurityIdentities and WritePublicInformation help-text files (imported here) ensure any <Link target="_blank"> also sets rel="noopener noreferrer" (some existing components only use noopener). This prevents potential reverse-tab-napping.

packages/go/ein/incoming_models.go (1)

138-146: Struct additions correctly follow existing pattern

RPCEncryptionEnforced and DisabledExtensions embed APIResult like the neighboring types and introduce the expected Value/Data fields. No functional or stylistic issues spotted, and the fields are picked up in CARegistryData.

Also applies to: 153-155

packages/go/lab/loader.go (1)

24-32: slices import pins the codebase to Go 1.21+

The std-lib slices package arrived in Go 1.21. If CI or downstream users are still on 1.20, builds will fail.

packages/javascript/bh-shared-ui/src/components/HelpTexts/ADCSESC16/Composition.tsx (1)

24-29: Possible typo: use enum/member access instead of string-indexing

EdgeInfoItems['composition'] works only if EdgeInfoItems is an object literal, but in the rest of the codebase it’s treated like an enum (e.g., EdgeInfoItems.composition).
Using bracket notation here introduces an implicit string key and bypasses type-checking.

-        type: EdgeInfoItems['composition'],
+        type: EdgeInfoItems.composition,

If EdgeInfoItems is indeed a const enum, the current code won’t compile. Please confirm the intended shape.

packages/javascript/bh-shared-ui/src/components/HelpTexts/WritePublicInformation/General.tsx (5)

1-16: License header is correctly applied.
Apache 2.0 license and SPDX identifier are present and properly formatted.


18-21: Import statements look good.
All required modules (Typography, FC, EdgeInfoProps, groupSpecialFormat, and typeFormat) are imported succinctly.


23-24: Component signature is clear and typed.
Using FC<EdgeInfoProps> provides strong typing, and destructuring only the needed props keeps the signature clean.


26-29: Correct use of formatting helpers in the first paragraph.
groupSpecialFormat and typeFormat inject the dynamic entity names/types appropriately.


38-40: Export is correctly defined.
export default General; cleanly exposes the component for consumption.

packages/cue/bh/ad/ad.cue (2)

973-999: Confirm backend / frontend handling for newly-added properties

RPCEncryption{Enforced|Collected} and DisabledExtensions{,Collected} are correctly declared and appended to Properties, but the Go ingestion layer (incoming_models.go, ad.go) and the JS graph schema still need corresponding string constants (or generated code) to avoid silent drops during unmarshalling / rendering.

Please double-check that:

  1. These four strings are present in the const () blocks in packages/go/graphschema/ad.
  2. They are added to PropertyEnumid<>name mappings used by the REST API.
  3. The front-end graphSchema.ts export is regenerated.

Skipping any of the above will produce “unknown property” warnings at runtime.

Also applies to: 1133-1136


1598-1602: Edge-kind additions look good – verify traversal / abuse helpers

ADCSESC16, WriteAltSecurityIdentities, and WritePublicInformation have been wired into all the major kind collections 🎉.
Just ensure:

  • Post-processing functions (esc16.go, etc.) emit these exact strings.
  • UI edgeTypes.tsx & help-text indexes were regenerated (looks like they were).
  • Unit / integration tests cover path-finding traversal on the new kinds (not only existence).

Also applies to: 1653-1661, 1735-1748, 1780-1782, 1828-1839, 1862-1866

packages/go/graphschema/ad/ad.go (1)

1112-1119: Enum slices stay consistent – good work.

ADCSESC16, WriteAltSecurityIdentities, and WritePublicInformation were added everywhere necessary (Relationships/ACL/Pathfinding).
No issues spotted.

packages/go/analysis/ad/esc6.go (1)

39-43: Early exit correctly guards on collection flag – LGTM.

packages/javascript/bh-shared-ui/src/graphSchema.ts (1)

480-483: Display strings present – looks good.

Also applies to: 749-756

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 3

♻️ Duplicate comments (15)
cmd/api/src/test/integration/harnesses.go (2)

7228-7233: Missing UpdateNode calls after setting properties on EnterpriseCA nodes
The IsUserSpecifiesSanEnabledCollected and original SAN-enabled flags are set on EnterpriseCA0/1/2 but never persisted. Add the following lines after line 7233 to ensure the changes are applied:

 graphTestContext.UpdateNode(s.EnterpriseCA0)
 graphTestContext.UpdateNode(s.EnterpriseCA1)
 graphTestContext.UpdateNode(s.EnterpriseCA2)

7351-7355: Missing UpdateNode call for EnterpriseCA1
EnterpriseCA1 is missing an update after its flags are set. Extend the update sequence:

 graphTestContext.UpdateNode(s.EnterpriseCA0)
+graphTestContext.UpdateNode(s.EnterpriseCA1)
packages/go/analysis/ad/adcs.go (1)

210-217: Post-processing fan-out still duplicated

The new PostADCSESC16 block follows the same copy-paste pattern previously flagged. Re-iterating earlier feedback: collapse these 12 nearly identical SubmitReader calls into a table-driven loop to cut maintenance overhead.

packages/go/lab/loader.go (1)

95-103: 🛠️ Refactor suggestion

Still mutating nodeKinds while ranging – duplicates & brittle logic remain
The loop appends to nodeKinds during iteration and then breaks. This is exactly the issue highlighted in the earlier review and can still introduce duplicated kinds (Base/AZBase) as well as the general “modify-while-iterate” foot-gun.

-	for _, kind := range nodeKinds {
-		if slices.Contains(ad.NodeKinds(), kind) {
-			nodeKinds = append(nodeKinds, ad.Entity)
-			break
-		} else if slices.Contains(azure.NodeKinds(), kind) {
-			nodeKinds = append(nodeKinds, azure.Entity)
-			break
-		}
-	}
+	isAD    := slices.ContainsFunc(nodeKinds, func(k graph.Kind) bool { return slices.Contains(ad.NodeKinds(), k) })
+	isAzure := slices.ContainsFunc(nodeKinds, func(k graph.Kind) bool { return slices.Contains(azure.NodeKinds(), k) })
+
+	if isAD {
+		nodeKinds = append(nodeKinds, ad.Entity)
+	}
+	if isAzure {
+		nodeKinds = append(nodeKinds, azure.Entity)
+	}
+
+	nodeKinds = slices.Compact(nodeKinds) // remove accidental dups

This keeps the code clear, avoids slice mutation during range, and guarantees deduplication.

packages/javascript/bh-shared-ui/src/components/HelpTexts/WriteAltSecurityIdentities/References.tsx (1)

23-95: Add noreferrer to every external link
All Link components use rel="noopener" but omit noreferrer, leaving the referrer header exposed and enabling reverse tab-napping.

-<Link target='_blank' rel='noopener'
+<Link target='_blank' rel='noopener noreferrer'

Apply to every occurrence in this file.

packages/javascript/bh-shared-ui/src/components/HelpTexts/ADCSESC16/WindowsAbuse.tsx (1)

25-32: ⚠️ Potential issue

Template name typo – should be /template:ESC16
The example command still references ESC6, which contradicts the ESC16 context and will confuse readers.

-.\\Certify.exe ... /template:ESC6 ...
+.\\Certify.exe ... /template:ESC16 ...

Please update the sample command.

cmd/api/src/test/integration/harnesses/ADCSESC16Harness.json (1)

114-169: ⚠️ Potential issue

Relationship IDs still collide with node IDs

Previous feedback pointed this out; the current harness still re-uses the "nX" pattern for relationships ("id": "n0", "id": "n1" …).
Some graph loaders require IDs to be unique across the whole set and may drop or overwrite data.

Rename relationship IDs to a distinct namespace (e.g. r0, rel-0, etc.):

-      "id": "n0",
+      "id": "r0",-      "id": "n1",
+      "id": "r1",-      "id": "n2",
+      "id": "r2",
cmd/api/src/analysis/ad/adcs_integration_test.go (3)

29-32: Duplicate import alias still present

The aliased re-import of graphschema (schema) was already flagged in a previous review. It violates ST1019 and risks symbol collisions.

🧰 Tools
🪛 golangci-lint (1.64.8)

[error] 29-29: ST1019: package "github.com/specterops/bloodhound/graphschema" is being imported more than once

(stylecheck)


[error] 30-30: ST1019(related information): other import of "github.com/specterops/bloodhound/graphschema"

(stylecheck)


3671-3673: Call operation.Done() once, after the loop

Closing the operation inside the for loop terminates internal channels before all readers are submitted – same issue noted in earlier tests.

-		err = operation.Done()
-		require.Nil(t, err)
-	}
+	}
+
+	err = operation.Done()
+	require.NoError(t, err)

3651-3653: ⚠️ Potential issue

Handle FetchADCSPrereqs error immediately

err is discarded, so the test will keep running with undefined pre-requisites and will panic later.

-	groupExpansions, enterpriseCertAuthorities, _, domains, cache, err := FetchADCSPrereqs(graphDB)
+	groupExpansions, enterpriseCertAuthorities, _, domains, cache, err := FetchADCSPrereqs(graphDB)
+	require.NoError(t, err)
packages/javascript/bh-shared-ui/src/components/HelpTexts/WritePublicInformation/LinuxAbuse.tsx (2)

22-22: Consider removing unused props or documenting their purpose.

Similar to WindowsAbuse.tsx, this component accepts EdgeInfoProps but doesn't use any of the properties.


34-34: ⚠️ Potential issue

Fix the grammatical error.

Missing word "meet" in the sentence.

-                The certificate must the following requirements:
+                The certificate must meet the following requirements:
packages/go/analysis/ad/esc16.go (3)

244-246: ⚠️ Potential issue

Restore critical CA-level predicates

The IsUserSpecifiesSanEnabled and DisabledExtensions filters are still commented out, so any Enroll → CA edge is treated as ESC16. This re-opens the false-positive hole called out earlier.


266-274: ⚠️ Potential issue

Re-enable template-validation clauses

The manager-approval, auth-enabled and schema/authorized-signatures checks remain commented. Without them, virtually every published template matches, massively over-reporting ESC16 paths.


257-258: 🛠️ Refactor suggestion

Remove unused edgeKind parameter

edgeKind is passed to ADCSESC16Path2Pattern but never referenced inside the function. It’s dead code that confuses readers and triggers linters.

-func ADCSESC16Path2Pattern(domainId graph.ID, enterpriseCAs cardinality.Duplex[uint64], edgeKind graph.Kind) traversal.PatternContinuation {
+func ADCSESC16Path2Pattern(domainId graph.ID, enterpriseCAs cardinality.Duplex[uint64]) traversal.PatternContinuation {

…and drop the argument at all call-sites.

Also applies to: 197-198

🧹 Nitpick comments (25)
packages/javascript/bh-shared-ui/src/views/TierManagement/TierManagement.tsx (1)

21-33: Import order tidy-up acknowledged, but enforce linter/auto-sort to avoid churn

The three ROUTE_TIER_MANAGEMENT_SUMMARY* imports were merely moved upward for grouping. While harmless, manual shuffling easily drifts from whatever canonical ordering the rest of the codebase follows (alphabetical, path-depth, eslint-plugin-import, etc.). Consider configuring / re-running an import-sorting linter (e.g. eslint-plugin-import/order) so these re-orderings are automatic and consistent project-wide, preventing noise in future diffs.

packages/javascript/bh-shared-ui/src/views/TierManagement/Details/MembersList.tsx (1)

27-29: Two separate utils paths may cause accidental drift

ItemSkeleton is still imported from ../utils, whereas SelectedHighlight and getListHeight are now imported from ./utils.
Unless the intent is to have two different utility modules, consider consolidating them into a single location to avoid duplicated helpers and confusing maintenance later on.

packages/go/analysis/ad/post.go (1)

57-61: Duplicate kinds remain in the slice – clean-up recommended

Owns and WriteOwner are each listed twice in PostProcessedRelationships().
While unrelated to the new ADCSESC16 entry, the duplicates add minor overhead and may confuse future readers.

-        ad.Owns,
-        ad.WriteOwner,
         ad.ExtendedByPolicy,
-        ad.Owns,
-        ad.WriteOwner,
+        ad.ExtendedByPolicy,
packages/go/cypher/test/cases/positive_tests.json (1)

694-697: Long edge-type list getting unwieldy

The test query now carries 40 + relationship kinds in a single pattern. Consider extracting the list to a constant or splitting lines to improve readability and diff-friendliness—but functionally this is fine.

packages/javascript/bh-shared-ui/src/components/HelpTexts/ADCSESC16/References.tsx (2)

1-16: Update license year to current project standard.

The file header lists 2024, but other new modules in this PR use 2025. Please synchronize the copyright year.


23-64: Include noreferrer in link rel attributes.

For all external <Link target='_blank'>, add noreferrer to the rel prop to improve security:

-                rel='noopener'
+                rel='noopener noreferrer'
packages/javascript/bh-shared-ui/src/components/HelpTexts/WriteAltSecurityIdentities/WriteAltSecurityIdentities.tsx (1)

23-29: Align property key order for readability
Consider reordering the keys in WriteAltSecurityIdentities (e.g., match import order or alphabetical) to make the mapping easier to scan.

packages/javascript/bh-shared-ui/src/components/HelpTexts/ADCSESC16/ADCSESC16.tsx (1)

24-31: Align property key order for readability
For consistency, reorder the keys in the ADCSESC16 object (e.g., general, composition, linuxAbuse, opsec, references, windowsAbuse) to mirror imports or alphabetical order.

packages/javascript/bh-shared-ui/src/components/HelpTexts/WriteAltSecurityIdentities/Opsec.tsx (1)

20-30: Remove unnecessary React fragment
Since there's only a single <Typography> element, you can return it directly without the surrounding <>...</> fragment.

packages/javascript/bh-shared-ui/src/components/HelpTexts/ADCSESC16/Opsec.tsx (1)

23-26: Drop duplicate wording for crisper copy

Redundant use of “identify” in the same sentence hurts readability. A quick tweak keeps the message tight:

-            identify illegitimately issued certificates and identify the principal that requested the certificate, as
-            well as the target identity the attacker is attempting to impersonate.
+            identify illegitimately issued certificates and trace the principal that requested the certificate, as well
+            as the target identity the attacker is attempting to impersonate.
packages/javascript/bh-shared-ui/src/components/HelpTexts/WritePublicInformation/References.tsx (1)

23-95: Add noreferrer for safer external links

Opening links in a new tab should include both noopener and noreferrer to prevent tab-nabbing and suppress referrer leakage.

-<Link target='_blank' rel='noopener' href='https://attack.mitre.org/techniques/T1098/'>
+<Link target='_blank' rel='noopener noreferrer' href='https://attack.mitre.org/techniques/T1098/'>

Apply the same change to every external <Link> in this file.

packages/go/lab/loader.go (1)

166-185: STRLIST: / DECIMAL: parsers need trimming & empty-value handling

  1. strings.Split(val, ",") returns []string{""} for an empty input – likely not intended.
  2. Neither branch trims outer spaces before parsing; " 1.23 " will currently fail for DECIMAL: and leave whitespace in list items.
-	listVal := strings.Split(val, ",")
-	for i := range listVal {
-		listVal[i] = strings.TrimSpace(listVal[i])
-	}
+	val = strings.TrimSpace(val)
+	if val == "" {
+		out.Set(k, []string{})
+	} else {
+		listVal := strings.Split(val, ",")
+		for i := range listVal {
+			listVal[i] = strings.TrimSpace(listVal[i])
+		}
+		out.Set(k, listVal)
+	}
-	if floatVal, err := strconv.ParseFloat(val, 64); err != nil {
+	if floatVal, err := strconv.ParseFloat(strings.TrimSpace(val), 64); err != nil {

These small fixes make the new property types robust against common input quirks.

packages/javascript/bh-shared-ui/src/components/HelpTexts/ADCSESC16/General.tsx (1)

26-37: Minor grammar & readability polish

  • “allow an attacker principal” → “allows an attacker”
  • “allowing for authentication” → “that allow authentication”
  • “This setup allow” → “This setup allows”

While purely cosmetic, tightening the language improves professionalism of on-screen help text.

packages/javascript/bh-shared-ui/src/components/HelpTexts/ADCSESC16/Composition.tsx (2)

24-29: Prefer property-access over index-access for runtime constants

EdgeInfoItems is imported as a value. Using bracket notation (EdgeInfoItems['composition']) works only if the property literally exists at runtime.
If EdgeInfoItems is later refactored to an enum or type-only export, this expression collapses to undefined after compilation and the hook will receive an invalid type.

-        type: EdgeInfoItems['composition'],
+        type: EdgeInfoItems.composition,

38-44: Guard against empty results

VirtualizedNodeList is rendered whenever the request resolves without error, even when nodesArray.length === 0.
Showing an empty list gives no visual cue that the edge has no composing objects. Consider displaying a short notice instead.

-                ) : (
-                    <VirtualizedNodeList nodes={nodesArray} />
+                ) : nodesArray.length === 0 ? (
+                    <Alert severity='info'>No composing objects found for this edge.</Alert>
+                ) : (
+                    <VirtualizedNodeList nodes={nodesArray} />
                 )}
packages/javascript/bh-shared-ui/src/components/HelpTexts/WriteAltSecurityIdentities/General.tsx (1)

26-28: Minor grammar tweak improves readability

The sentence currently omits a verb:

“Group1 the ability to write …”

Add “has” (or “has been granted”) for correct English.

-                {groupSpecialFormat(sourceType, sourceName)} the ability to write to the AltSecurityIdentities attribute
+                {groupSpecialFormat(sourceType, sourceName)} has the ability to write to the <code>altSecurityIdentities</code> attribute

Also, the attribute is normally written in lowercase (altSecurityIdentities) in Microsoft documentation.

packages/javascript/bh-shared-ui/src/components/HelpTexts/WritePublicInformation/General.tsx (2)

26-28: Missing verb breaks sentence readability

The sentence rendered to the UI currently reads:
<source> the ability to write …”.
It needs a verb (“has”) to be grammatically correct.

- {groupSpecialFormat(sourceType, sourceName)} the ability to write to the Public-Information property set
+ {groupSpecialFormat(sourceType, sourceName)} has the ability to write to the Public-Information property set

30-33: Run-on sentence & missing comma

Small grammar fix to avoid a run-on sentence:

- The Public-Information property set includes the altSecurityIdentities attribute allows you to specify
+ The Public-Information property set includes the altSecurityIdentities attribute, which allows you to specify
packages/javascript/bh-shared-ui/src/components/HelpTexts/ADCSESC16/LinuxAbuse.tsx (1)

21-23: Consider declaring unused props for API-shape consistency

Other help-text components are typed FC<EdgeInfoProps>.
Here we use FC without props; this is perfectly valid, but creates an inconsistent public API surface.
Either:

  1. Add EdgeInfoProps even if unused, or
  2. Omit the unused import to avoid dead code.

No functional bug—just consistency.

packages/cue/bh/ad/ad.cue (1)

1598-1601: Relationship kind additions are complete but duplicated “ExtendedByPolicy” remains

The new kinds (ADCSESC16, WriteAltSecurityIdentities, WritePublicInformation) are wired into every required list – good.

Unrelated, but while touching this area: ExtendedByPolicy is declared twice (lines 1533-1541 & 1538-1546).
This pre-existing duplication can trigger CUE compile errors for duplicate symbol names.

If you’re already regenerating schemas, worth cleaning now.

Also applies to: 1653-1661, 1735-1748

packages/javascript/bh-shared-ui/src/components/HelpTexts/WriteAltSecurityIdentities/LinuxAbuse.tsx (2)

34-39: Grammar – missing verb

- The certificate must the following requirements:
+ The certificate must meet the following requirements:

102-104: Typo: duplicate “the”

- Verify the that the mapping was added using ldapsearch:
+ Verify that the mapping was added using ldapsearch:
packages/javascript/bh-shared-ui/src/components/HelpTexts/WritePublicInformation/WindowsAbuse.tsx (2)

34-39: Grammar – missing verb

Same phrasing issue as in Linux variant:

- The certificate must the following requirements:
+ The certificate must meet the following requirements:

110-111: Small wording tweak

“Verify the that the mapping …” – appears later in file as well.
Replace duplicate “the”.

packages/javascript/bh-shared-ui/src/components/HelpTexts/WriteAltSecurityIdentities/WindowsAbuse.tsx (1)

22-22: Consider removing unused props or documenting their purpose.

The component accepts EdgeInfoProps but doesn't use any of the properties. If these props are required for consistency with other help text components, consider adding a comment explaining this. Otherwise, remove the unused props.

-const WindowsAbuse: FC<EdgeInfoProps> = () => {
+// EdgeInfoProps maintained for consistency with help text component interface
+const WindowsAbuse: FC<EdgeInfoProps> = () => {
📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 0762b6e and b730fde.

⛔ Files ignored due to path filters (3)
  • cmd/api/src/test/integration/harnesses/esc6a-eca.svg is excluded by !**/*.svg
  • cmd/api/src/test/integration/harnesses/esc6a-template1.svg is excluded by !**/*.svg
  • cmd/api/src/test/integration/harnesses/esc6a-template2.svg is excluded by !**/*.svg
📒 Files selected for processing (47)
  • cmd/api/src/analysis/ad/adcs_integration_test.go (2 hunks)
  • cmd/api/src/test/integration/harnesses.go (7 hunks)
  • cmd/api/src/test/integration/harnesses/ADCSESC16Harness.json (1 hunks)
  • cmd/api/src/test/integration/harnesses/esc6a-eca.json (5 hunks)
  • cmd/api/src/test/integration/harnesses/esc6a-template1.json (1 hunks)
  • cmd/api/src/test/integration/harnesses/esc6a-template2.json (1 hunks)
  • packages/cue/bh/ad/ad.cue (10 hunks)
  • packages/go/analysis/ad/ad.go (1 hunks)
  • packages/go/analysis/ad/adcs.go (1 hunks)
  • packages/go/analysis/ad/esc16.go (1 hunks)
  • packages/go/analysis/ad/esc6.go (1 hunks)
  • packages/go/analysis/ad/post.go (1 hunks)
  • packages/go/cypher/test/cases/positive_tests.json (1 hunks)
  • packages/go/ein/ad.go (1 hunks)
  • packages/go/ein/incoming_models.go (1 hunks)
  • packages/go/graphschema/ad/ad.go (7 hunks)
  • packages/go/graphschema/common/common.go (1 hunks)
  • packages/go/lab/loader.go (3 hunks)
  • packages/javascript/bh-shared-ui/src/components/HelpTexts/ADCSESC16/ADCSESC16.tsx (1 hunks)
  • packages/javascript/bh-shared-ui/src/components/HelpTexts/ADCSESC16/Composition.tsx (1 hunks)
  • packages/javascript/bh-shared-ui/src/components/HelpTexts/ADCSESC16/General.tsx (1 hunks)
  • packages/javascript/bh-shared-ui/src/components/HelpTexts/ADCSESC16/LinuxAbuse.tsx (1 hunks)
  • packages/javascript/bh-shared-ui/src/components/HelpTexts/ADCSESC16/Opsec.tsx (1 hunks)
  • packages/javascript/bh-shared-ui/src/components/HelpTexts/ADCSESC16/References.tsx (1 hunks)
  • packages/javascript/bh-shared-ui/src/components/HelpTexts/ADCSESC16/WindowsAbuse.tsx (1 hunks)
  • packages/javascript/bh-shared-ui/src/components/HelpTexts/WriteAltSecurityIdentities/General.tsx (1 hunks)
  • packages/javascript/bh-shared-ui/src/components/HelpTexts/WriteAltSecurityIdentities/LinuxAbuse.tsx (1 hunks)
  • packages/javascript/bh-shared-ui/src/components/HelpTexts/WriteAltSecurityIdentities/Opsec.tsx (1 hunks)
  • packages/javascript/bh-shared-ui/src/components/HelpTexts/WriteAltSecurityIdentities/References.tsx (1 hunks)
  • packages/javascript/bh-shared-ui/src/components/HelpTexts/WriteAltSecurityIdentities/WindowsAbuse.tsx (1 hunks)
  • packages/javascript/bh-shared-ui/src/components/HelpTexts/WriteAltSecurityIdentities/WriteAltSecurityIdentities.tsx (1 hunks)
  • packages/javascript/bh-shared-ui/src/components/HelpTexts/WritePublicInformation/General.tsx (1 hunks)
  • packages/javascript/bh-shared-ui/src/components/HelpTexts/WritePublicInformation/LinuxAbuse.tsx (1 hunks)
  • packages/javascript/bh-shared-ui/src/components/HelpTexts/WritePublicInformation/Opsec.tsx (1 hunks)
  • packages/javascript/bh-shared-ui/src/components/HelpTexts/WritePublicInformation/References.tsx (1 hunks)
  • packages/javascript/bh-shared-ui/src/components/HelpTexts/WritePublicInformation/WindowsAbuse.tsx (1 hunks)
  • packages/javascript/bh-shared-ui/src/components/HelpTexts/WritePublicInformation/WritePublicInformation.tsx (1 hunks)
  • packages/javascript/bh-shared-ui/src/components/HelpTexts/index.tsx (4 hunks)
  • packages/javascript/bh-shared-ui/src/edgeTypes.tsx (2 hunks)
  • packages/javascript/bh-shared-ui/src/graphSchema.ts (9 hunks)
  • packages/javascript/bh-shared-ui/src/views/TierManagement/Details/Details.tsx (1 hunks)
  • packages/javascript/bh-shared-ui/src/views/TierManagement/Details/DetailsList.tsx (1 hunks)
  • packages/javascript/bh-shared-ui/src/views/TierManagement/Details/EntityInfo/SelectorList.tsx (1 hunks)
  • packages/javascript/bh-shared-ui/src/views/TierManagement/Details/MembersList.tsx (1 hunks)
  • packages/javascript/bh-shared-ui/src/views/TierManagement/Details/utils.tsx (0 hunks)
  • packages/javascript/bh-shared-ui/src/views/TierManagement/Summary/SummaryList.tsx (1 hunks)
  • packages/javascript/bh-shared-ui/src/views/TierManagement/TierManagement.tsx (1 hunks)
💤 Files with no reviewable changes (1)
  • packages/javascript/bh-shared-ui/src/views/TierManagement/Details/utils.tsx
🧰 Additional context used
🧬 Code Graph Analysis (16)
packages/javascript/bh-shared-ui/src/components/HelpTexts/WriteAltSecurityIdentities/WriteAltSecurityIdentities.tsx (1)
packages/go/graphschema/ad/ad.go (1)
  • WriteAltSecurityIdentities (125-125)
packages/go/ein/ad.go (2)
packages/go/ein/incoming_models.go (3)
  • CARegistryData (148-155)
  • RPCEncryptionEnforced (138-141)
  • DisabledExtensions (143-146)
packages/go/graphschema/ad/ad.go (2)
  • RPCEncryptionEnforced (263-263)
  • DisabledExtensions (265-265)
packages/javascript/bh-shared-ui/src/components/HelpTexts/WriteAltSecurityIdentities/WindowsAbuse.tsx (1)
packages/javascript/bh-shared-ui/src/components/HelpTexts/index.tsx (1)
  • EdgeInfoProps (142-151)
packages/javascript/bh-shared-ui/src/components/HelpTexts/WritePublicInformation/WindowsAbuse.tsx (1)
packages/javascript/bh-shared-ui/src/components/HelpTexts/index.tsx (1)
  • EdgeInfoProps (142-151)
packages/go/analysis/ad/post.go (1)
packages/go/graphschema/ad/ad.go (1)
  • ADCSESC16 (114-114)
packages/javascript/bh-shared-ui/src/components/HelpTexts/WritePublicInformation/LinuxAbuse.tsx (1)
packages/javascript/bh-shared-ui/src/components/HelpTexts/index.tsx (1)
  • EdgeInfoProps (142-151)
packages/go/lab/loader.go (2)
packages/go/dawgs/graph/kind.go (1)
  • StringsToKinds (154-162)
packages/go/graphschema/ad/ad.go (2)
  • NodeKinds (1134-1136)
  • Entity (28-28)
packages/go/analysis/ad/ad.go (2)
packages/go/graphschema/ad/ad.go (1)
  • ADCSESC16 (114-114)
packages/go/analysis/ad/esc16.go (1)
  • GetADCSESC16EdgeComposition (110-231)
packages/javascript/bh-shared-ui/src/components/HelpTexts/WritePublicInformation/WritePublicInformation.tsx (1)
packages/go/graphschema/ad/ad.go (1)
  • WritePublicInformation (126-126)
packages/javascript/bh-shared-ui/src/components/HelpTexts/WritePublicInformation/General.tsx (1)
packages/javascript/bh-shared-ui/src/components/HelpTexts/index.tsx (1)
  • EdgeInfoProps (142-151)
packages/go/ein/incoming_models.go (1)
packages/go/graphschema/ad/ad.go (2)
  • RPCEncryptionEnforced (263-263)
  • DisabledExtensions (265-265)
packages/javascript/bh-shared-ui/src/components/HelpTexts/index.tsx (1)
packages/go/graphschema/ad/ad.go (3)
  • ADCSESC16 (114-114)
  • WriteAltSecurityIdentities (125-125)
  • WritePublicInformation (126-126)
packages/javascript/bh-shared-ui/src/components/HelpTexts/WriteAltSecurityIdentities/General.tsx (1)
packages/javascript/bh-shared-ui/src/components/HelpTexts/index.tsx (1)
  • EdgeInfoProps (142-151)
packages/javascript/bh-shared-ui/src/components/HelpTexts/WriteAltSecurityIdentities/LinuxAbuse.tsx (1)
packages/javascript/bh-shared-ui/src/components/HelpTexts/index.tsx (1)
  • EdgeInfoProps (142-151)
packages/javascript/bh-shared-ui/src/components/HelpTexts/ADCSESC16/General.tsx (1)
packages/javascript/bh-shared-ui/src/components/HelpTexts/index.tsx (1)
  • EdgeInfoProps (142-151)
packages/javascript/bh-shared-ui/src/components/HelpTexts/ADCSESC16/ADCSESC16.tsx (1)
packages/go/graphschema/ad/ad.go (1)
  • ADCSESC16 (114-114)
🪛 Gitleaks (8.26.0)
packages/javascript/bh-shared-ui/src/components/HelpTexts/WritePublicInformation/LinuxAbuse.tsx

99-99: Detected a Generic API Key, potentially exposing access to various services and sensitive operations.

(generic-api-key)


121-121: Detected a Generic API Key, potentially exposing access to various services and sensitive operations.

(generic-api-key)

🪛 golangci-lint (1.64.8)
cmd/api/src/analysis/ad/adcs_integration_test.go

[error] 30-30: ST1019(related information): other import of "github.com/specterops/bloodhound/graphschema"

(stylecheck)

🔇 Additional comments (39)
packages/javascript/bh-shared-ui/src/views/TierManagement/Summary/SummaryList.tsx (1)

1-15: License header addition looks correct

Header matches project convention and includes SPDX identifier.
No functional impact; please ensure the linter / build pipeline has been updated (if necessary) to recognise the new header length to avoid max-lines warnings.

packages/javascript/bh-shared-ui/src/views/TierManagement/Details/Details.tsx (1)

24-24: Import re-ordering only – LGTM

Moving TierActionBar higher keeps related Tier-Management imports grouped. Nothing else changed.

packages/javascript/bh-shared-ui/src/views/TierManagement/Details/DetailsList.tsx (1)

31-31: Combined util imports are clearer

Collapsing two imports into one reduces noise. 👍

packages/javascript/bh-shared-ui/src/views/TierManagement/Details/EntityInfo/SelectorList.tsx (1)

23-23: Consolidated import – good housekeeping

Merging into a single import keeps the file tidy and prevents duplicate bindings.

cmd/api/src/test/integration/harnesses/esc6a-template2.json (1)

112-114: Confirm downstream code reads the new IsUserSpecifiesSanEnabledCollected flag

The harness now carries both IsUserSpecifiesSanEnabled and the new IsUserSpecifiesSanEnabledCollected properties.
Double-check that analysis / post-processing consumes the Collected variant exclusively; if both exist, remove the legacy key in fixtures to avoid ambiguity.

cmd/api/src/test/integration/harnesses/esc6a-template1.json (1)

111-115: LGTM – property addition is consistent

Adding IsUserSpecifiesSanEnabledCollected aligns the harness with the updated post-processing logic. No concerns.

packages/go/analysis/ad/ad.go (1)

572-576: Case for ADCSESC16 wired in correctly

The switch now routes ADCSESC16 edges to GetADCSESC16EdgeComposition, matching the other ESC handlers. Looks good.

cmd/api/src/test/integration/harnesses/esc6a-eca.json (5)

131-134: Include IsUserSpecifiesSanEnabledCollected flag on EnterpriseCA0 node.

Adding this property on the first EnterpriseCA node ensures the harness can differentiate between the original SAN-enabled state and the collected state for testing.


227-231: Set collected flag to false for EnterpriseCA1.

Explicitly marking IsUserSpecifiesSanEnabledCollected: "False" here captures the scenario where SAN collection was disabled.


329-332: Include collected flag on EnterpriseCA3 node.

Consistently adding IsUserSpecifiesSanEnabledCollected supports the ESC6a post‐processing logic in the integration test.


429-432: Include collected flag on EnterpriseCA4 node.

This ensures the harness fully exercises the code path when SAN‐enabled data is collected.


529-532: Include collected flag on EnterpriseCA5 node.

Adding this property completes the setup for all EnterpriseCA nodes in the ESC6a harness.

packages/javascript/bh-shared-ui/src/edgeTypes.tsx (2)

96-100: Register new advanced object manipulation edge types.

The additions of WriteAltSecurityIdentities and WritePublicInformation under Advanced Object Manipulation align with the updated schema and backend support.


114-118: Add ADCSESC16 to ADCS certificate services.

Including ADCSESC16 in the Active Directory Certificate Services subcategory reflects the new post‐processing relationship and ensures it appears in the UI.

packages/javascript/bh-shared-ui/src/components/HelpTexts/WritePublicInformation/WritePublicInformation.tsx (1)

17-31: Expose WritePublicInformation help texts.

Aggregating the General, WindowsAbuse, LinuxAbuse, Opsec, and References components into the WritePublicInformation object correctly wires up the new UI documentation.

packages/javascript/bh-shared-ui/src/components/HelpTexts/WritePublicInformation/Opsec.tsx (1)

20-31: Add operational security guidance for WritePublicInformation.

The Opsec component concisely explains defender detection strategies via the issued‐certificates store.

packages/go/ein/ad.go (2)

1167-1171: Include RPCEncryptionEnforced registry property
The new RPCEncryptionEnforced block correctly parses and adds the boolean to propMap.


1172-1176: Include DisabledExtensions registry property
The DisabledExtensions block properly parses and attaches the string slice to propMap. Ensure downstream consumers handle this raw slice as expected.

cmd/api/src/test/integration/harnesses.go (5)

3615-3617: Approve addition of collected property and update call for EnterpriseCA1
The new IsUserSpecifiesSanEnabledCollected flag is set and the node is persisted with UpdateNode.


5069-5071: Approve addition of collected property and update call for EnterpriseCA
Adding and persisting IsUserSpecifiesSanEnabledCollected here is consistent with other harness setups.


5187-5189: Approve collected property on new EnterpriseCA and updateNode call
The harness now correctly tracks and persists the collected SAN-enabled flag.


5355-5379: Approve bulk addition of collected property and update for multiple EnterpriseCA nodes
All EnterpriseCA instances (0,1,3,4,5) now include the IsUserSpecifiesSanEnabledCollected flag and are updated via UpdateNode.


5482-5484: Approve collected property and update call for EnterpriseCA in Domain scenario
Consistent with other harness routines, the new property is set and persisted.

packages/javascript/bh-shared-ui/src/components/HelpTexts/index.tsx (1)

22-23: Imports and registry update look correct

The new help-text modules are properly imported and registered in EdgeInfoComponents; no naming or typing inconsistencies spotted.

Also applies to: 131-140, 260-277

packages/go/ein/incoming_models.go (1)

138-156: Struct additions align with existing style

New registry-data wrappers (RPCEncryptionEnforced, DisabledExtensions) mirror prior patterns and slot cleanly into CARegistryData. No functional or tag discrepancies detected.

packages/go/graphschema/common/common.go (1)

42-47: Lists are hand-edited in a generated file – verify generator alignment
common.go is tagged “Code generated … DO NOT EDIT”, yet the new kinds were appended manually. Ensure the underlying CUE schema / generator is updated; otherwise future regen will overwrite these additions.

packages/cue/bh/ad/ad.cue (1)

973-999: Property enum additions look correct – remember to update collectors

The four new CA registry properties are declared & added to Properties; string representations follow the established lower-snake convention.
Double-check that:

  1. The ingest/collector code emits exactly these representation strings.
  2. There are matching Go graphschema constants (appears so from other diffs).

LGTM otherwise.

packages/javascript/bh-shared-ui/src/components/HelpTexts/WriteAltSecurityIdentities/LinuxAbuse.tsx (1)

56-64: Minor wording & link placement

“The last requirement does not have to be met if a DC has UPN mapping disabled (see link).”
Consider moving the link outside the parentheses for cleaner sentence flow, but not critical.

packages/javascript/bh-shared-ui/src/components/HelpTexts/WriteAltSecurityIdentities/WindowsAbuse.tsx (1)

65-131: Well-structured abuse instructions.

The step-by-step guide is clear and comprehensive, with proper command examples and explanations for each phase of the attack.

packages/javascript/bh-shared-ui/src/components/HelpTexts/WritePublicInformation/LinuxAbuse.tsx (1)

97-122: Command examples are appropriate.

The static analysis warnings about API keys are false positives. The flagged values are LDAP distinguished names and SHA1 hash placeholders used in command examples, not actual secrets.

🧰 Tools
🪛 Gitleaks (8.26.0)

99-99: Detected a Generic API Key, potentially exposing access to various services and sensitive operations.

(generic-api-key)


121-121: Detected a Generic API Key, potentially exposing access to various services and sensitive operations.

(generic-api-key)

packages/javascript/bh-shared-ui/src/graphSchema.ts (4)

143-143: New relationship kinds properly integrated.

The new ADCS ESC16 and write permission relationship kinds are correctly added to the schema.

Also applies to: 154-155


299-300: Display mappings correctly implemented.

The display function properly handles the new relationship kinds with appropriate user-friendly names.

Also applies to: 321-324


342-342: Arrays properly updated with new relationships.

The new relationship kinds are correctly added to both the edge composition and pathfinding arrays.

Also applies to: 805-805, 814-815


480-483: New properties correctly implemented.

The RPC encryption and disabled extensions properties follow the established pattern with both value and collection status flags.

Also applies to: 749-756

packages/go/analysis/ad/esc6.go (2)

38-81: Excellent refactoring of ESC6a post-processing.

The changes improve the function by:

  • Adding proper collection status validation before checking the actual value
  • Simplifying the logic by directly computing enrollers and submitting jobs
  • Reducing memory overhead by eliminating intermediate bitmap operations

83-128: Consistent refactoring of ESC6b post-processing.

The changes mirror the improvements in ESC6a while preserving the scenario-specific UPNCertMapping validation.

packages/go/graphschema/ad/ad.go (3)

114-114: Generated constants correctly match TypeScript schema.

The new relationship kinds and properties in the Go schema are consistent with the TypeScript definitions.

Also applies to: 125-126, 263-266


270-270: Property handling functions properly updated.

The generated parsing and utility functions correctly handle the new properties.

Also applies to: 536-543


1112-1112: Relationship arrays comprehensively updated.

All relevant relationship arrays include the new kinds, maintaining consistency across the schema.

Also applies to: 1115-1115, 1118-1118, 1121-1121, 1124-1124

@JonasBK JonasBK force-pushed the adcs-update branch 3 times, most recently from a057a07 to 1a4feb1 Compare June 19, 2025 10:29
@JonasBK JonasBK closed this Jul 9, 2025
@github-actions github-actions bot locked and limited conversation to collaborators Jul 9, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New feature or request external This pull request is from an external contributor
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant