Skip to content

feat(easm): add EASM source integration - #79

Open
alexpederneschi wants to merge 21 commits into
mia-platform:mainfrom
UNGUESS-Security:easm
Open

feat(easm): add EASM source integration#79
alexpederneschi wants to merge 21 commits into
mia-platform:mainfrom
UNGUESS-Security:easm

Conversation

@alexpederneschi

Copy link
Copy Markdown

Hello,

What this PR is for?

Adds a new source that integrates EASM scan results into the Catalog. It reads a customer's latest completed run from the backend endpoint as a single cursor-paginated list of items, each tagged with a type discriminator (domain, host, ip, endpoint, vulnerability), and emits one source.Data per item.

Includes:

  • internal/source/easm/ with client, env config, and the SyncableSource implementation.
  • Wiring in internal/cmd/common.go to register the easm source.
  • Example ItemTypeDefinitions and mappings under docs/examples/easm/.

Note: This PR does not include tests yet.

@giulioroggero

Copy link
Copy Markdown
Member

Thanks, we will verify the new connector soon

@albertocaminati albertocaminati left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Review

Base answer

Hi, first of all, thank you for your first contribution!
I'll send you a review with all the changes needed.

Resources and Docs

Docs

I would ask you to add a docs that will be used to configure correctly the new source (like in 'docs/how-to' for the existing sources).

ITDs

The group of the ITDs cannot be mia-platform.eu, this is reserved to the one automatically seeded by the Catalog. A possible value you could use is unguess.io.
This also reflects on the filenames of the single ITDs, e.g. easm.unguess.io.domains.yaml or domains.easm.unguess.io.yaml (the second is more intuitive explicitating the resource name on the left).
The version is preferable to be v1 since we have also moved on from v1alpha1, unless you specifically wanted it to be an alpha.
About the spec.names it is needed to add singular and displaySingular.

Mappings

Both the points of group and version apply here too. Thus for apiVersion all combined could become unguess.io/v1.

Resource Files Location

More in general I would ask you to move all the above resources respectively in the following directories:

  • docs/external-sources/easm/how-to/010_easm-source.md
  • docs/external-sources/easm/mappings/*
  • docs/external-sources/easm/itds/*

Missing tests

I saw the tests are completely missing at the moment, can you add them for your new developed source?
Without tests with a meaningful coverage this PR cannot be merged by our contributing guidelines.
My advice is to run them using the already prepared command from the Makefile, since they then matches with the CI:

# Clean all artifacts for clean test run
make clean-all

# Linting
make lint

# Tests with race conditions and coverage check
make test-coverage

Code & Style

It seems ok and in line with the rest of the ibdm project.

@alexpederneschi

Copy link
Copy Markdown
Author

Thank you for the review. We've gone through all the points, here's what was changed.

Docs

I added docs/external-sources/easm/how-to/010_easm-source.md, following the same structure and style as the existing sources in docs/how-to.

ITDs

I changed the group to easm.unguess.io and renamed the files accordingly to the resource-name-left form (domains.easm.unguess.io.yaml, etc.). The version is now v1, and I added singular and displaySingular to spec.names. The top-level apiVersion is now easm.unguess.io/v1 as well.

Mappings

The apiVersion in all mappings is now easm.unguess.io/v1, consistent with the ITD group and version.

Resource Files Location

Everything is now under docs/external-sources/easm/{itds,mappings,how-to}/ as requested.

Tests

I added a full test suite under internal/source/easm/. The only make lint failure is a pre-existing, unrelated nolintlint issue in internal/mapper/functions/objects.go, no EASM code involved.

APagani-Mia and others added 17 commits August 20, 2026 10:38
Bumps [actions/setup-go](https://github.com/actions/setup-go) from 6.5.0 to 7.0.0.
- [Release notes](https://github.com/actions/setup-go/releases)
- [Commits](actions/setup-go@924ae3a...b7ad1da)

---
updated-dependencies:
- dependency-name: actions/setup-go
  dependency-version: 7.0.0
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Bumps [actions/stale](https://github.com/actions/stale) from 10.3.0 to 11.0.0.
- [Release notes](https://github.com/actions/stale/releases)
- [Changelog](https://github.com/actions/stale/blob/main/CHANGELOG.md)
- [Commits](actions/stale@eb5cf3a...4391f3d)

---
updated-dependencies:
- dependency-name: actions/stale
  dependency-version: 11.0.0
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Bumps [actions/checkout](https://github.com/actions/checkout) from 6.0.2 to 7.0.1.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](actions/checkout@de0fac2...3d3c42e)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-version: 7.0.1
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
….4 (mia-platform#80)

Bumps ghcr.io/devcontainers/features/go from 1.3.3 to 1.3.4.

---
updated-dependencies:
- dependency-name: ghcr.io/devcontainers/features/go
  dependency-version: 1.3.4
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
…ia-platform#81)

Bumps the minor-actions-dependencies group with 4 updates: [docker/login-action](https://github.com/docker/login-action), [softprops/action-gh-release](https://github.com/softprops/action-gh-release), [github/codeql-action/init](https://github.com/github/codeql-action) and [github/codeql-action/analyze](https://github.com/github/codeql-action).


Updates `docker/login-action` from 4.4.0 to 4.6.0
- [Release notes](https://github.com/docker/login-action/releases)
- [Commits](docker/login-action@af1e73f...dbcb813)

Updates `softprops/action-gh-release` from 3.0.1 to 3.0.2
- [Release notes](https://github.com/softprops/action-gh-release/releases)
- [Changelog](https://github.com/softprops/action-gh-release/blob/master/CHANGELOG.md)
- [Commits](softprops/action-gh-release@718ea10...3d0d988)

Updates `github/codeql-action/init` from 4.36.3 to 4.37.3
- [Release notes](https://github.com/github/codeql-action/releases)
- [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md)
- [Commits](github/codeql-action@54f647b...e4fba86)

Updates `github/codeql-action/analyze` from 4.36.3 to 4.37.3
- [Release notes](https://github.com/github/codeql-action/releases)
- [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md)
- [Commits](github/codeql-action@54f647b...e4fba86)

---
updated-dependencies:
- dependency-name: docker/login-action
  dependency-version: 4.6.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: minor-actions-dependencies
- dependency-name: softprops/action-gh-release
  dependency-version: 3.0.2
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: minor-actions-dependencies
- dependency-name: github/codeql-action/init
  dependency-version: 4.37.3
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: minor-actions-dependencies
- dependency-name: github/codeql-action/analyze
  dependency-version: 4.37.3
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: minor-actions-dependencies
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants