Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create rscSync to Pull Assessments from RSC Mission Instance #159

Merged
merged 14 commits into from
Apr 18, 2024

Conversation

Matthew-Grayson
Copy link
Contributor

@Matthew-Grayson Matthew-Grayson commented Apr 9, 2024

🗣 Description

Create rscSync.ts to fetch assessments from RSC mission instance
Add rscSync to api/scans.ts and alphabetize ScanSchema/imports
Add rscSync to worker.ts and alphabetize imports/scanFn
Add call to fetchAssessmentsByUser to RSCRegister endpoint
Remove unused imports from api/users.ts
Add unique constraint to assessment.rscId and question.number
Add populateRscQuestions.sql to populate questions, resources, and categories

💭 Motivation and context

rscSync pulls recently completed/updated assessments from the ReadySetCyber mission instance and can be scheduled in Crossfeed's Admin Tools console.
It only saves assessments associated with users registered with Crossfeed.
Additionally, rscSync pulls all assessments for a user upon registration.

🧪 Testing

✅ Pre-approval checklist

  • This PR has an informative and human-readable title.
  • Changes are limited to a single goal - eschew scope creep!
  • All future TODOs are captured in issues, which are referenced
    in code comments.
  • All relevant type-of-change labels have been added.
  • I have read the CONTRIBUTING document.
  • These code changes follow cisagov code standards.
  • All relevant repo and/or project documentation has been updated
    to reflect the changes in this PR.
  • Tests have been added and/or modified to cover the changes in this PR.
  • All new and existing tests pass.

✅ Pre-merge checklist

  • Revert dependencies to default branches.
  • Finalize version.

✅ Post-merge checklist

  • Create a release.

Change assessment.createdAt to @column() to store external createdAt date
Add assessment.rscId field
Change category.number and question.number fields to accept strings
Add question.description field
Remove resource.possibleResponses and make resource.url unique
Rename response.text to response.selection
@Matthew-Grayson Matthew-Grayson self-assigned this Apr 11, 2024
@Matthew-Grayson Matthew-Grayson changed the title 113 create models for readysetcyber data Create rscSync to Pull Assessments from RSC Mission Instance Apr 12, 2024
@Matthew-Grayson Matthew-Grayson marked this pull request as ready for review April 12, 2024 15:33
Copy link
Collaborator

@cduhn17 cduhn17 left a comment

Choose a reason for hiding this comment

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

LGTM

@cduhn17
Copy link
Collaborator

cduhn17 commented Apr 12, 2024

@Matthew-Grayson add labels to PR?

@michaelsaki michaelsaki linked an issue Apr 15, 2024 that may be closed by this pull request
3 tasks
Copy link
Collaborator

@nickviola nickviola left a comment

Choose a reason for hiding this comment

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

LGTM

@schmelz21 schmelz21 merged commit 346e595 into develop Apr 18, 2024
17 of 18 checks passed
cisagovbot pushed a commit that referenced this pull request Apr 30, 2024
…s/setup-python-5

Bump actions/setup-python from 4 to 5
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.

Create Models for ReadySetCyber Data
5 participants