Skip to content
This repository has been archived by the owner on Sep 3, 2024. It is now read-only.

Commit

Permalink
Move J1 questions to open source
Browse files Browse the repository at this point in the history
  • Loading branch information
aiwilliams committed Nov 9, 2021
1 parent 77ff6af commit 455da29
Show file tree
Hide file tree
Showing 4 changed files with 60 additions and 1 deletion.
38 changes: 38 additions & 0 deletions .github/workflows/questions.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
name: Questions
on: [pull_request_target]

jobs:
validate:
runs-on: ubuntu-latest

steps:
- id: setup-node
name: Setup Node
uses: actions/setup-node@v1
with:
node-version: 14.x

- name: Check out `main` branch
uses: actions/checkout@v2
with:
path: source

- name: Check out target branch questions
uses: actions/checkout@v2
with:
ref: ${{github.event.pull_request.head.ref}}
repository: ${{github.event.pull_request.head.repo.full_name}}
path: target

- name: Install dependencies for `main` branch
run: yarn install --cwd source

- name: Validate questions on target branch
env:
MANAGED_QUESTIONS_JUPITERONE_ACCOUNT_ID: ${{ secrets.MANAGED_QUESTIONS_JUPITERONE_ACCOUNT_ID }}
MANAGED_QUESTIONS_JUPITERONE_API_KEY: ${{ secrets.MANAGED_QUESTIONS_JUPITERONE_API_KEY }}
run: yarn --cwd source
j1-integration validate-question-file
-a $MANAGED_QUESTIONS_JUPITERONE_ACCOUNT_ID
-k $MANAGED_QUESTIONS_JUPITERONE_API_KEY
-p ../target/jupiterone/questions/questions.yaml
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ and this project adheres to

## [Unreleased]

- Move questions into open source repository

## 1.0.0 2021-11-08

- Upgrade to `@jupiterone/integration-sdk-*@^7.4.0`
Expand Down
16 changes: 16 additions & 0 deletions jupiterone/questions/questions.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
---
sourceId: managed:sentinelone
integrationDefinitionId: "${integration_definition_id}"
questions:
- id: integration-question-sentinelone-agent-not-installed
title: Which end-user devices do not have SentinelOne agent installed?
description:
Find all user endpoint devices not protected by SentinelOne agent.
queries:
- query: |
Find (user_endpoint|workstation|laptop|desktop|computer)
that !PROTECTS sentinelone_agent
tags:
- device
- endpoint

5 changes: 4 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@
"main": "dist/index.js",
"types": "dist/index.d.ts",
"files": [
"dist"
"dist",
"jupiterone"
],
"publishConfig": {
"access": "public"
Expand All @@ -16,6 +17,8 @@
"graph": "j1-integration visualize",
"graph:types": "j1-integration visualize-types",
"graph:spec": "j1-integration visualize-types --project-path docs/spec --output-file ./.j1-integration/types-graph/index.spec.html",
"validate:questions:dry": "j1-integration validate-question-file --dry-run",
"validate:questions": "j1-integration validate-question-file -a $MANAGED_QUESTIONS_JUPITERONE_ACCOUNT_ID -k $MANAGED_QUESTIONS_JUPITERONE_API_KEY",
"lint": "eslint . --cache --fix --ext .ts,.tsx",
"format": "prettier --write '**/*.{ts,js,json,css,md,yml}'",
"type-check": "tsc",
Expand Down

0 comments on commit 455da29

Please sign in to comment.