feat(easm): add EASM source integration - #79
Conversation
|
Thanks, we will verify the new connector soon |
albertocaminati
left a comment
There was a problem hiding this comment.
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-coverageCode & Style
It seems ok and in line with the rest of the ibdm project.
|
Thank you for the review. We've gone through all the points, here's what was changed. DocsI added ITDsI changed the MappingsThe Resource Files LocationEverything is now under TestsI added a full test suite under |
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>
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
typediscriminator (domain, host, ip, endpoint, vulnerability), and emits onesource.Dataper item.Includes:
internal/source/easm/with client, env config, and theSyncableSourceimplementation.internal/cmd/common.goto register theeasmsource.docs/examples/easm/.Note: This PR does not include tests yet.