How the Check Works
After some research, it seems like two_factor_requirement_enabled is the best field that can provide us with the information from the table github_organizations, which we populate from the GitHub API.
When the value of two_factor_requirement_enabled is true, the organization requires all members, billing managers, and outside collaborators to enable two-factor authentication. GH API documentation
Main logic:
- If the value is
true, it is considered as passed.
- If the value is
false, it is considered as failed.
- If the value is
NULL, it is considered as unknown.
Logic Edge Cases (multiple GitHub organizations):
- With a single
failed organization, the global check is considered failed.
- With a single
unknown organization (without any failed ones), the global check is considered unknown.
- Only if all the organizations have
passed, the global consideration is passed.
Alerts:
- Trigger alerts only when there are
failed organizations in the project. Ignore other scenarios.
Tasks:
Pending Tasks
How the Check Works
After some research, it seems like
two_factor_requirement_enabledis the best field that can provide us with the information from the tablegithub_organizations, which we populate from the GitHub API.Main logic:
true, it is considered aspassed.false, it is considered asfailed.NULL, it is considered asunknown.Logic Edge Cases (multiple GitHub organizations):
failedorganization, the global check is consideredfailed.unknownorganization (without anyfailedones), the global check is consideredunknown.passed, the global consideration ispassed.Alerts:
failedorganizations in the project. Ignore other scenarios.Tasks:
Pending Tasks
compliance_checksrow with the following fields:how_to_url,implementation_status,implementation_typeandimplementation_details_referencenpm run db:migrateandnpm run db:rollbacknpm run db:generate-schemasrc/checks/validators/index.jssrc/checks/complianceChecksisCheckApplicableToProjectCategory)severityvalue is well calculated (usegetSeverityFromPriorityGroup)compliance_checks_alertstable when is needed.compliance_checks_taskstable when is needed.compliance_checks_resultstable.check run --name {check_code_name}and verify the changes in the database. Update the seed script if needed (npm run db:seed)https://openjs-security-program-standards.netlify.app/details/{check_code_name}