Skip to content

fix(widget): Display internal objects representative in Audits Distribution List (#15773)#16750

Open
Archidoit wants to merge 8 commits into
masterfrom
issue/15773
Open

fix(widget): Display internal objects representative in Audits Distribution List (#15773)#16750
Archidoit wants to merge 8 commits into
masterfrom
issue/15773

Conversation

@Archidoit

Copy link
Copy Markdown
Member

Proposed changes

  • Add representative for internal objects
  • Ensure every internal objects is well displayed (instead of 'unknown') In Audits distribution list widgets

Related issues

fixes #15773

Copilot AI review requested due to automatic review settings June 22, 2026 15:48
@Archidoit Archidoit self-assigned this Jun 22, 2026
@Archidoit Archidoit added the filigran team Item from the Filigran team. label Jun 22, 2026
@Archidoit Archidoit changed the title [backend/frontend] Display internal objects representative in Audits Distribution List (#15773) fix(widget): Display internal objects representative in Audits Distribution List (#15773) Jun 22, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

This PR addresses audits “list distribution” widgets showing internal objects as Unknown by introducing a consistent representative.main for InternalObject entities, and updating the audits distribution query to use it so UI labels resolve properly.

Changes:

  • Add representative: Representative! to the InternalObject GraphQL interface and to many concrete internal object types (backend + frontend schema sync).
  • Implement an InternalObject.representative resolver backed by a new internal-object representative extractor.
  • Update audits distribution list query and expand/adjust integration tests to validate representative.main.

Reviewed changes

Copilot reviewed 43 out of 44 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
opencti-platform/opencti-graphql/tests/03-integration/02-resolvers/savedFilter-test.ts Extends saved filter query assertions to validate representative.main.
opencti-platform/opencti-graphql/tests/03-integration/02-resolvers/group-test.ts Extends groups query assertions to validate representative.main.
opencti-platform/opencti-graphql/tests/03-integration/02-resolvers/audit-test.ts Refactors audit queries and adds auditsDistribution test coverage for representative.main.
opencti-platform/opencti-graphql/src/resolvers/stixObjectOrStixRelationshipOrCreator.js Removes an unnecessary eslint-disable comment (no functional change).
opencti-platform/opencti-graphql/src/resolvers/internalObject.js Adds InternalObject.representative resolver using the new extraction helper.
opencti-platform/opencti-graphql/src/database/entity-representative.js Adds internal-object representative extraction (extractInternalObjectRepresentative).
opencti-platform/opencti-graphql/src/modules/xtm/hub/news-feed/news-feed.graphql Adds representative field to NewsFeedItem.
opencti-platform/opencti-graphql/src/modules/workspace/workspace.graphql Adds representative field to Workspace.
opencti-platform/opencti-graphql/src/modules/theme/theme.graphql Adds representative field to Theme.
opencti-platform/opencti-graphql/src/modules/task/task-template/task-template.graphql Adds representative field to TaskTemplate.
opencti-platform/opencti-graphql/src/modules/support/support.graphql Adds representative field to SupportPackage.
opencti-platform/opencti-graphql/src/modules/savedFilter/savedFilter.graphql Adds representative field to SavedFilter.
opencti-platform/opencti-graphql/src/modules/publicDashboard/publicDashboard.graphql Adds representative field to PublicDashboard.
opencti-platform/opencti-graphql/src/modules/playbook/playbook.graphql Adds representative field to Playbook.
opencti-platform/opencti-graphql/src/modules/pir/pir.graphql Adds representative field to Pir.
opencti-platform/opencti-graphql/src/modules/notifier/notifier.graphql Adds representative field to Notifier.
opencti-platform/opencti-graphql/src/modules/notification/notification.graphql Adds representative field to Trigger and Notification.
opencti-platform/opencti-graphql/src/modules/managerConfiguration/managerConfiguration.graphql Adds representative field to ManagerConfiguration.
opencti-platform/opencti-graphql/src/modules/internal/jsonMapper/jsonMapper.graphql Adds representative field to JsonMapper.
opencti-platform/opencti-graphql/src/modules/internal/csvMapper/csvMapper.graphql Adds representative field to CsvMapper.
opencti-platform/opencti-graphql/src/modules/ingestion/ingestion-taxii.graphql Adds representative field to IngestionTaxii.
opencti-platform/opencti-graphql/src/modules/ingestion/ingestion-taxii-collection.graphql Adds representative field to IngestionTaxiiCollection.
opencti-platform/opencti-graphql/src/modules/ingestion/ingestion-rss.graphql Adds representative field to IngestionRss.
opencti-platform/opencti-graphql/src/modules/ingestion/ingestion-json.graphql Adds representative field to IngestionJson.
opencti-platform/opencti-graphql/src/modules/ingestion/ingestion-csv.graphql Adds representative field to IngestionCsv.
opencti-platform/opencti-graphql/src/modules/form/form.graphql Adds representative field to Form.
opencti-platform/opencti-graphql/src/modules/fintelTemplate/fintelTemplate.graphql Adds representative field to FintelTemplate.
opencti-platform/opencti-graphql/src/modules/fintelDesign/fintelDesign.graphql Adds representative field to FintelDesign.
opencti-platform/opencti-graphql/src/modules/exclusionList/exclusionList.graphql Adds representative field to ExclusionList.
opencti-platform/opencti-graphql/src/modules/entitySetting/entitySetting.graphql Adds representative field to EntitySetting.
opencti-platform/opencti-graphql/src/modules/emailTemplate/emailTemplate.graphql Adds representative field to EmailTemplate.
opencti-platform/opencti-graphql/src/modules/draftWorkspace/draftWorkspace.graphql Adds representative field to DraftWorkspace.
opencti-platform/opencti-graphql/src/modules/disseminationList/disseminationList.graphql Adds representative field to DisseminationList.
opencti-platform/opencti-graphql/src/modules/deleteOperation/deleteOperation.graphql Adds representative field to DeleteOperation.
opencti-platform/opencti-graphql/src/modules/decayRule/exclusions/decayExclusionRule.graphql Adds representative field to DecayExclusionRule.
opencti-platform/opencti-graphql/src/modules/decayRule/decayRule.graphql Adds representative field to DecayRule.
opencti-platform/opencti-graphql/src/modules/customView/customView.graphql Adds representative field to CustomView.
opencti-platform/opencti-graphql/src/modules/catalog/catalog.graphql Adds representative field to Catalog.
opencti-platform/opencti-graphql/src/modules/case/case-template/case-template.graphql Adds representative field to CaseTemplate.
opencti-platform/opencti-graphql/src/modules/authenticationProvider/authenticationProvider.graphql Adds representative field to AuthenticationProvider.
opencti-platform/opencti-graphql/config/schema/opencti.graphql Adds representative to InternalObject interface/types and updates the union to include Vocabulary.
opencti-platform/opencti-graphql/src/generated/graphql.ts Regenerates backend TypeScript GraphQL types to include representative across internal objects.
opencti-platform/opencti-front/src/schema/relay.schema.graphql Syncs frontend Relay schema with backend (InternalObject.representative, union update).
opencti-platform/opencti-front/src/private/components/common/audits/AuditsDistributionList.tsx Updates auditsDistribution query to fetch representative.main for InternalObject entities (removing special-casing for Group).

Comment thread opencti-platform/opencti-graphql/src/database/entity-representative.js Outdated
@codecov

codecov Bot commented Jun 22, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 24.15%. Comparing base (7ddef68) to head (038cee0).
⚠️ Report is 5 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master   #16750      +/-   ##
==========================================
+ Coverage   24.09%   24.15%   +0.06%     
==========================================
  Files        3271     3271              
  Lines      173270   173416     +146     
  Branches    42957    43029      +72     
==========================================
+ Hits        41743    41890     +147     
+ Misses     131527   131526       -1     
Flag Coverage Δ
opencti-client-python 46.30% <ø> (ø)
opencti-front 5.63% <ø> (+0.01%) ⬆️
opencti-graphql 66.78% <100.00%> (+0.14%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

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

Labels

filigran team Item from the Filigran team.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

fix(audit): internal objects displayed as Unknown in the Audit list distribution

2 participants