Community
Questions Library
Docs
Blog
Events
Swag
Github
Slack
JupiterOne
Discussions
Release Notes
Contact Us
Development - AskJ1 Community
<main> <article class="userContent"> <p><em>Queries below require integration with either Github or Bitbucket.</em></p> <h2 data-id="were-there-any-code-repos-added-in-the-last-24-hours">Were there any Code Repos added in the last 24 hours?</h2> <pre class="code codeBlock" spellcheck="false" tabindex="0">Find CodeRepo with _beginOn > date.now-24hr and _version=1 </pre> <h2 data-id="which-prs-did-this-developer-open-in-the-last-5-days">Which PRs did this developer open in the last 5 days?</h2> <p>For a developer whose first name is Charlie:</p> <pre class="code codeBlock" spellcheck="false" tabindex="0">'Charlie' that OPENED PR with _createdOn > date.now - 5days as PR return PR.displayName, PR.name, PR.webLink </pre> <p>Or, the following query is more accurate but it requires an IdP integration and<br> proper mapping between the dev users and IdP users:</p> <pre class="code codeBlock" spellcheck="false" tabindex="0">Find Person with firstName='Charlie' that IS (github_user|bitbucket_user) that OPENED PR with _createdOn > date.now - 5days as PR return PR.displayName, PR.name, PR.webLink </pre> <h2 data-id="who-are-the-most-recent-contributors-to-this-repo">Who are the most recent contributors to this repo?</h2> <p><em>This is particularly useful to identify who might be the best person to fix a newly discovered vulnerability.</em></p> <pre class="code codeBlock" spellcheck="false" tabindex="0">Find User as u that OPENED PR as PR that HAS CodeRepo with name='repo-name' as repo return u.displayName, u.username, PR.displayName, PR.name, PR._createdOn, repo.name order by PR._createdOn limit 5 </pre> <h2 data-id="what-are-the-code-repos-for-a-particular-application-or-project">What are the code repos for a particular application or project?</h2> <pre class="code codeBlock" spellcheck="false" tabindex="0">Find CodeRepo that relates to (Application|Project) with name='JupiterOne' </pre> <h2 data-id="are-there-unapproved-or-self-approved-code-changes-in-the-last-week">Are there unapproved or self-approved code changes in the last week?</h2> <pre class="code codeBlock" spellcheck="false" tabindex="0">Find PR with approved=false and (createdOn > date.now-7days or updatedOn > date.now-7days) </pre> <h2 data-id="are-there-code-commits-by-an-unknown-developer-in-a-pr">Are there code commits by an unknown developer in a PR?</h2> <pre class="code codeBlock" spellcheck="false" tabindex="0">Find PR with validated=false </pre> </article> </main>