Skip to content

Reco v1.8.0: External API migration, multi-severity filter (PRO-303), 5 new commands#2

Open
yanivblumReco wants to merge 5 commits into
masterfrom
reco-external-api-migration
Open

Reco v1.8.0: External API migration, multi-severity filter (PRO-303), 5 new commands#2
yanivblumReco wants to merge 5 commits into
masterfrom
reco-external-api-migration

Conversation

@yanivblumReco

Copy link
Copy Markdown
Collaborator

Summary

  • External API migration: Moved ~11 client methods from Reco's internal table APIs (base64-encoded cell rows) to the new /api/v1/external-api/ endpoints, which return clean JSON. Affected commands: alert fetch/detail, comments, labels, identities, risky users, apps, app auth status, files, and API key validation.
  • PRO-303 — Multi-severity fetch filter: The Risk level configuration parameter now accepts a comma-separated list (e.g. HIGH,CRITICAL or 30,40). Values are parsed into a SCIM OR filter: (severity eq "HIGH" or severity eq "CRITICAL"). Single values continue to work unchanged.
  • Rate-limit handling: All External API calls go through _rate_limited_request() which retries on HTTP 429 (up to 3× with exponential backoff, honouring Retry-After header).
  • 5 new commands backed by the External API list endpoints (all accept SCIM v2 filters and limit):
    • reco-list-events
    • reco-list-posture-issues
    • reco-list-accounts
    • reco-list-devices
    • reco-list-ai-agents
  • Updated output schemas: Context paths for reco-get-risky-users, reco-get-user-context-by-email-address, reco-get-sensitive-assets-by-id, reco-get-assets-by-id, and reco-get-apps updated to camelCase External API field names.
  • Pack README rewrite: Updated to Reco's current "SaaS & AI Security" positioning, five-sprawl problem framing, and four use-case sections (AI Governance, AI Agent Security, Posture Management, Threat Detection & Response).
  • Version bump: 1.7.4 → 1.8.0.

Key API endpoint changes

Command Old endpoint New endpoint
fetch-incidents / alert list PUT /policy-subsystem/alert-inbox/table GET /external-api/alerts/list
get_single_alert GET /policy-subsystem/alert-inbox/{id} GET /external-api/alert-details/{id}
reco-add-comment-to-alert POST /share-service/share-comment POST /external-api/comments/create
label commands PUT /set-label-status POST /external-api/labels/add
reco-get-user-context-by-email-address PUT /risk-management/get-risk-management-table GET /external-api/users/list
reco-get-risky-users identity table with label filter GET /external-api/accounts/list?filters=isRiskyUser eq true
reco-get-apps PUT /asset-management/query GET /external-api/apps/list
reco-set-app-authorization-status PUT /app-risk-management/insert-risk-management-app PUT /external-api/apps/{id}/auth-status
sensitive assets / files PUT /asset-management/query GET /external-api/files/list
test-module GET /policy-subsystem/alert-inbox?limit=1 GET /external-api/alerts/list?count=1

Commands kept on internal APIs (no external equivalent): reco-change-alert-status, reco-resolve-visibility-event, reco-get-assets-user-has-access-to, reco-get-sensitive-assets-with-public-link, reco-get-3rd-parties-accessible-to-data-list, reco-get-files-shared-with-3rd-parties, reco-get-files-exposed-to-email-address, reco-get-assets-shared-externally, reco-get-private-email-list-with-access, reco-add-exclusion-filter, reco-get-link-to-user-overview-page, reco-get-alert-ai-summary.

Test plan

  • test-module passes against a live Reco instance
  • fetch-incidents with Risk level = HIGH,CRITICAL returns only HIGH and CRITICAL alerts
  • fetch-incidents with Risk level = 30 (single numeric) continues to work
  • reco-list-events, reco-list-accounts, reco-list-devices, reco-list-ai-agents, reco-list-posture-issues return results with SCIM filter examples from README
  • reco-get-risky-users returns Account objects (camelCase fields: accountEmail, hasMfa, isRiskyUser)
  • reco-get-apps returns App objects (camelCase fields: usersCount, vendorGrade, aiCapability)
  • reco-add-comment-to-alert posts a comment via the external API
  • reco-add-risky-user-label labels an identity via the external labels endpoint

Resolves PRO-303

🤖 Generated with Claude Code

…ty filter

- Migrate alerts, identities, apps, files, labels, and comments
  from internal table APIs to /api/v1/external-api/* endpoints;
  responses are plain JSON (no base64-encoded cell rows)
- Support comma-separated Risk level filter in fetch-incidents
  (e.g. HIGH,CRITICAL builds a SCIM OR filter) — resolves PRO-303
- Add automatic 429 retry with exponential backoff for all
  External API calls via _rate_limited_request()
- Add five new list commands backed by the External API:
  reco-list-events, reco-list-posture-issues, reco-list-accounts,
  reco-list-devices, reco-list-ai-agents (all accept SCIM filters)
- Update pack README with Reco SaaS & AI Security positioning
- Bump version to 1.8.0

Signed-off-by: Yaniv Blum <yanivb@reco.ai>
@yanivblumReco
yanivblumReco force-pushed the reco-external-api-migration branch from e40d7c5 to 81d64a6 Compare July 17, 2026 17:25
…ilter

- Silence xsoar-lint E9003 on the rate-limit backoff sleep (matches the
  inline-disable convention used by other integrations' retry loops).
- Rewrite unit tests that still mocked the old internal Table API
  endpoints for flows migrated to the External API (fetch-incidents,
  risky users, user context, sensitive assets, app discovery/auth
  status), and fix a couple of assertions left over from the old
  response shapes.
- Change the risk_level fetch-incidents parameter from a comma-separated
  exact-match list back to a single minimum-severity value: e.g. MEDIUM
  now fetches medium, high, and critical alerts (PRO-303).
- List every renamed/removed context output field per migrated command
  (RiskyUsers, User, SensitiveAssets, Apps, AppAuthorization) so upgrading
  customers know which playbooks/layouts will silently stop populating.
- Call out the fetch-incidents Risk level semantic change explicitly:
  it now fetches the given severity and above, not an exact match.
- Correct "five new commands" to the actual 14 added in this release.
- Reco.py: bound the _paginate_all loop with MAX_PAGES, call
  demisto.args() once and reuse it in main(), remove the unused
  create_filter() helper.
- Reco_test.py: add unit tests for all 14 new reco-list-* commands.
- Reco.yml: fix output/argument descriptions to start with "The " and
  end with a period, use active voice in command descriptions, drop
  the default-value duplication in limit-arg descriptions, bump
  fromversion to 6.8.0 (sectionorder/section require it), and restore
  additionalinfo for config params that generate-docs left blank.
- Regenerate the integration README structurally (Base Command
  sections, full Input/Output tables for every command, including the
  14 new list commands and the ones with stale "Same as X" shortcuts),
  while preserving the hand-written intro and SCIM filter guide.
- Pack README: fix multi-product wording, AI agent capitalization, and
  a missing comma.
- Bump to 2.0.0 (major) for the breaking changes, add the
  breakingChanges companion JSON, and rewrite the release notes to
  match this repo's doc-review templates (starred command/field
  styling, approved bullet prefixes, no ad-hoc heading for breaking
  changes).
- pack_metadata.json: add the Reco keyword and githubUser field.
Box-drawing separators, em dashes, and an arrow in comments/docstrings
were valid UTF-8 but broke XSOAR's Go-based YAML parser when the
script gets embedded into the unified integration YAML on upload
("yaml: control characters are not allowed"). Replaced with plain
ASCII equivalents.
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.

1 participant