Skip to content

Censys related infra usecase#666

Merged
AmitJ98 merged 14 commits intochronicle:mainfrom
jayminp-crest:censys-related-infra-usecase
Apr 15, 2026
Merged

Censys related infra usecase#666
AmitJ98 merged 14 commits intochronicle:mainfrom
jayminp-crest:censys-related-infra-usecase

Conversation

@jayminp-crest
Copy link
Copy Markdown
Contributor

@jayminp-crest jayminp-crest commented Apr 7, 2026

Censys Related Infrastructure Usecase

  • Adds suppport for new endpoints related to related infrastrcture

Checklist:

Please ensure you have completed the following items before submitting your PR.
This helps us review your contribution faster and more efficiently.

General Checks:

  • I have read and followed the project's contributing.md guide.
  • My code follows the project's coding style guidelines.
  • I have performed a self-review of my own code.
  • My changes do not introduce any new warnings.
  • My changes pass all existing tests.
  • I have added new tests where appropriate to cover my changes. (If applicable)
  • I have updated the documentation where necessary (e.g., README, API docs). (If applicable)

Open-Source Specific Checks:

  • My changes do not introduce any Personally Identifiable Information (PII) or sensitive customer data.
  • My changes do not expose any internal-only code examples, configurations, or URLs.
  • All code examples, comments, and messages are generic and suitable for a public repository.
  • I understand that any internal context or sensitive details related to this work are handled separately in internal systems (Buganizer for Google team members).

Note

Medium Risk
Adds new Censys Threat Hunting (CensEye) API calls and async job polling/results retrieval, which could impact action behavior and API usage if request/response assumptions are wrong.

Overview
Adds a new Censys CensEye “Related Infrastructure” playbook that runs a 3-step flow: create a related-infrastructure job, poll job status asynchronously, then fetch and display pivot results.

Extends the Censys integration with new actions (Create Related Infrastructure Job, Get Related Infrastructure Job Status, Get Related Infrastructure Results), new APIManager endpoints/methods for CensEye jobs/results, and a RelatedInfraResultModel that formats pivots into a table and generates Censys search URLs. Also bumps the integration version to 3.0, updates release notes/examples, and includes mostly formatting/test harness updates.

Reviewed by Cursor Bugbot for commit 2ca22bc. Bugbot is set up for automated code reviews on this repo. Configure here.

@jayminp-crest jayminp-crest requested a review from a team as a code owner April 7, 2026 06:03
@gemini-code-assist
Copy link
Copy Markdown
Contributor

Summary of Changes

Hello, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request expands the Censys integration by adding support for CensEye related infrastructure discovery. It introduces new actions that allow users to initiate asynchronous jobs to analyze hosts, web properties, or certificates, monitor their status, and retrieve detailed pivot results. These changes include necessary updates to the core API manager, new data models for result formatting, and updated documentation and tests to ensure reliability.

Highlights

  • New CensEye Actions: Added three new actions to the Censys integration: Create Related Infrastructure Job, Get Related Infrastructure Job Status, and Get Related Infrastructure Results.
  • API Manager Updates: Updated the APIManager to support the new CensEye API endpoints for job management and result retrieval.
  • Data Modeling: Introduced the RelatedInfraResultModel to handle the formatting of pivot results and the generation of Censys search URLs.
  • Testing: Added comprehensive unit tests for the new actions, including parameter validation and API interaction scenarios.

🧠 New Feature in Public Preview: You can now enable Memory to help Gemini Code Assist learn from your team's feedback. This makes future code reviews more consistent and personalized to your project's style. Click here to enable Memory in your admin console.

Ignored Files
  • Ignored by pattern: content/playbooks/** (8)
    • content/playbooks/third_party/partner/censys_related_infrastructure/definition.yaml
    • content/playbooks/third_party/partner/censys_related_infrastructure/display_info.yaml
    • content/playbooks/third_party/partner/censys_related_infrastructure/overviews.yaml
    • content/playbooks/third_party/partner/censys_related_infrastructure/release_notes.yaml
    • content/playbooks/third_party/partner/censys_related_infrastructure/steps/create_related_infrastructure_job_28d22.yaml
    • content/playbooks/third_party/partner/censys_related_infrastructure/steps/get_related_infrastructure_job_status_bb201.yaml
    • content/playbooks/third_party/partner/censys_related_infrastructure/steps/get_related_infrastructure_results_8a05d.yaml
    • content/playbooks/third_party/partner/censys_related_infrastructure/trigger.yaml
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for GitHub and other Google products, sign up here.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request introduces three new actions to the Censys integration—Create Related Infrastructure Job, Get Related Infrastructure Job Status, and Get Related Infrastructure Results—enabling users to discover and monitor related infrastructure via the CensEye API. The implementation includes updates to the APIManager, new data models for pivot result formatting, and comprehensive unit tests. Review feedback identifies several improvement opportunities, including strengthening input validation for web properties, removing redundant string operations, and ensuring proper failure handling when expected job IDs are missing from API responses. Additionally, the feedback notes that JSON example filenames should be updated to comply with repository naming conventions and suggests using double quotes in search query generation to better handle special characters.

Comment thread content/response_integrations/third_party/partner/censys/core/datamodels.py Outdated
@github-actions
Copy link
Copy Markdown

github-actions bot commented Apr 9, 2026

Marketplace Validation Failed

Click to view the full report

Validation Report

🧩 Integrations
Pre-Build Stage

censys

Validation Name Details
⚠️ Integration Version Bump project.toml file must be updated before PR

@TalShafir1
Copy link
Copy Markdown
Member

@jayminp-crest Hey!
To submit this PR, please increase the version of the integration as indicated by the failing github-action and feel free to solve, or resolve issues gemini suggested.

@jayminp-crest
Copy link
Copy Markdown
Contributor Author

@TalShafir1 - Resolved the comments and fixed the github action issues.

@github-actions
Copy link
Copy Markdown

Marketplace Validation Failed

Click to view the full report

Validation Report

🧩 Integrations
Pre-Build Stage

censys

Validation Name Details
⚠️ JSON Result Example Validation Actions with JSON results missing example files in resources/: get_related_infrastructure_job_status, create_related_infrastructure_job, get_related_infrastructure_results

@github-actions
Copy link
Copy Markdown

Marketplace Validation Failed

Click to view the full report

Validation Report

🧩 Integrations
Pre-Build Stage

censys

Validation Name Details
⚠️ JSON Result Example Validation Actions with JSON results missing example files in resources/: get_related_infrastructure_job_status, create_related_infrastructure_job, get_related_infrastructure_results

Copy link
Copy Markdown

@cursor cursor bot left a comment

Choose a reason for hiding this comment

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

Cursor Bugbot has reviewed your changes and found 1 potential issue.

There are 2 total unresolved issues (including 1 from previous review).

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit 2ca22bc. Configure here.

@TalShafir1
Copy link
Copy Markdown
Member

@jayminp-crest We've added some new validations, please take a look and try to resolve them. If you have any question please let me know

@jayminp-crest
Copy link
Copy Markdown
Contributor Author

Hi @TalShafir1 / @AmitJ98 - To resolve this Gemini feedback i have changed the resource file names. But now i am gettting a valdiation error stating the files are missing which are already there.

Could you please suggest what should be the correct file name format for the action example result json?

@AmitJ98
Copy link
Copy Markdown
Contributor

AmitJ98 commented Apr 13, 2026

get_related_infrastructure_job_status

the naming of the file need to be action_name_JsonResult_example.json
thanks you for letting us know that gemini mistake, we will tune it to be better.

@cursor
Copy link
Copy Markdown

cursor bot commented Apr 13, 2026

You have used all of your free Bugbot PR reviews.

To receive reviews on all of your PRs, visit the Cursor dashboard to activate Pro and start your 14-day free trial.

@cursor
Copy link
Copy Markdown

cursor bot commented Apr 13, 2026

You have used all of your free Bugbot PR reviews.

To receive reviews on all of your PRs, visit the Cursor dashboard to activate Pro and start your 14-day free trial.

@cursor
Copy link
Copy Markdown

cursor bot commented Apr 14, 2026

You have used all of your free Bugbot PR reviews.

To receive reviews on all of your PRs, visit the Cursor dashboard to activate Pro and start your 14-day free trial.

@github-actions
Copy link
Copy Markdown

Marketplace Validation Failed

Click to view the full report

Validation Report

📘 Playbooks
Pre-Build Stage

censys_rescan

Validation Name Details
⚠️ Playbook Version Bump release_notes.yml file must be updated before PR

censys_host_history

Validation Name Details
⚠️ Playbook Version Bump release_notes.yml file must be updated before PR

Comment thread content/playbooks/third_party/partner/censys_rescan/definition.yaml
@cursor
Copy link
Copy Markdown

cursor bot commented Apr 14, 2026

You have used all of your free Bugbot PR reviews.

To receive reviews on all of your PRs, visit the Cursor dashboard to activate Pro and start your 14-day free trial.

@github-actions
Copy link
Copy Markdown

Marketplace Validation Failed

Click to view the full report

Validation Report

📘 Playbooks
Pre-Build Stage

censys_rescan

Validation Name Details
⚠️ Playbook Version Bump The release note's version must be incremented to 2.0 and be consistent in all the newly added notes.

censys_host_history

Validation Name Details
⚠️ Playbook Version Bump The release note's version must be incremented to 2.0 and be consistent in all the newly added notes.

Comment thread content/playbooks/third_party/partner/censys_host_history/release_notes.yaml Outdated
@cursor
Copy link
Copy Markdown

cursor bot commented Apr 14, 2026

You have used all of your free Bugbot PR reviews.

To receive reviews on all of your PRs, visit the Cursor dashboard to activate Pro and start your 14-day free trial.

@github-actions
Copy link
Copy Markdown

Marketplace Validation Failed

Click to view the full report

Validation Report

📘 Playbooks
Pre-Build Stage

censys_rescan

Validation Name Details
⚠️ Playbook Version Bump The release note's version must be incremented to 2.0 and be consistent in all the newly added notes.

censys_host_history

Validation Name Details
⚠️ Playbook Version Bump The release note's version must be incremented to 2.0 and be consistent in all the newly added notes.

@jayminp-crest
Copy link
Copy Markdown
Contributor Author

Hi @AmitJ98 - I have bumped version of the playbook in release_notes.yaml for the updated playbooks. But still i am getting the same failure in the pipeline.

Comment thread content/playbooks/third_party/partner/censys_rescan/release_notes.yaml Outdated
@cursor
Copy link
Copy Markdown

cursor bot commented Apr 15, 2026

You have used all of your free Bugbot PR reviews.

To receive reviews on all of your PRs, visit the Cursor dashboard to activate Pro and start your 14-day free trial.

@AmitJ98
Copy link
Copy Markdown
Contributor

AmitJ98 commented Apr 15, 2026

Hey @jayminp-crest the pr approved and merged.
Thanks for contributing to the Content-Hub! 🚀
If you have thoughts on how we can improve the process, please let us know. And if you’re finding the release workflow useful, give our repository a star on GitHub ⭐

@AmitJ98 AmitJ98 merged commit 636ba14 into chronicle:main Apr 15, 2026
32 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants