Skip to content

Commit

Permalink
Release/v0.9.7 (#1677)
Browse files Browse the repository at this point in the history
* implemented security objectives for systems. reverting element version

* test

* get project directly

* need an element and system

* ele and system

* added comp state/type to element model, some system sec info to comp gen.

* test

* Add Django mgt cmd importcomponents to batch import components

Updates to generation of components to improve adherence to OSCAL
specification by removing certain keys when value for keys is None.

Added new parameter `existing_import_record` to importing and creating
components to group multiple imports under the same import record.

* Make Elements.description TextField and required

Change Elements.description to TextField and make required.
Modify component edit modal to use a textarea for description field.
Fixes to show error on problem saving edit to library component

* Use self.element.tags.exists()

* Send proper error message when editing component

* Temporarily remove controls/migrations/0051_auto

* Add back better controls/migrations/0051_auto

* fixed control and sectioning for components in system

* check for security impact level statement when updating. Readding retrieval of security impact levels. todo on separate form for levels.

* adding component_state and component_type to system component and component library display. including component_metadata template to keep styling consistent

* pulling in some of the information from statement about system. Rest would come from questionnaires. system_information_types is not used at all.

* a todo for fisma impact level renaming

* added project_security_objs_edit to edit security objectives separately from project editing.

* update changelog and some wording in the modal

* Move action-button styles from inline to style section

* two views/urls for editing component state and type

* adding component type and state to ElementForm

* adding just the display of the state and type to component library components not the ability to change.

* changelog

* FISMA IMPACT LEVEL is now SECURITY SENSITIVITY LEVEL

* Work inprogress

* Work inprogress

* Da/quick insert (#1601)

* make sure component_type not element_type is exported

* ssp versions should be floats not integers. Information types needs a uuid

* adding empty placeholders for the required keys.

* using updated for component version

* party-uuids is still a todo

* categorizations is still a todo

* parties is still a todo

* Fix system ctl detail page err; Improve creating smt from prototypes (#1602)

Refactor creating system control statements from component library
prototype statements when adding a component from the library to a system
and reduce by an order a magnitude the time it takes to add a component to system.

Rename smt.create_instance_from_prototype to smt.create_system_control_smt_from_component_prototype_smt

Fix bug breaking rendering of system's control detail page by
removing an errant login_required decorator on a function.
Add test for system control page. Will add test(s) for system control detail page.

Co-authored-by: Greg Elin <greg.elin@govready.com>

* Automatically clear, refresh output document content downloading docs

Performnce of document generation now sufficiently fast
to not require cache and manual "Refresh documents" button.

* remove comments. changelog

* Fixed an issue where statement didn't exist while exporting to oscal (#1605)

* Fixed an issue where statement didn't exist while exporting to oscal

* Update CHANGELOG

Co-authored-by: Alexander Ward <alexander.ward1@gmail.com>
Co-authored-by: Greg Elin <greg.elin@govready.com>

* Align Delete section on project settings (#1604)

Co-authored-by: Greg Elin <greg.elin@govready.com>

* Update CHANGELOG

* Ge/file upload extensions (#1607)

* Accepts file uploads with capitalized extensions, e.g. ".JPG".

Adjust file upload validator to recognize capitalized extensions
and also recognizes ".jpeg" in addition to ".jpg".

* Add tests for validating uppercase extensions on file uploads

* Add test fixture data

Co-authored-by: Greg Elin <greg.elin@govready.com>

* Batch update cntl impl smts when component_statement changes

Implemented a faster way to update status of system controls.
When user sets a system component state to "operational" all statements
associated with that component for the system get their status set to
"Implemented". Similarly, setting component’s state to "planned" batch
sets all component statements for that system to "Planned", and
"under-development" sets component statements to "Partially Implemented".

Display system component component_state and component_type when
component is listed for a system.

* More okta changes

* export a projects ssp control implementations with export form (#1611)

* export a projects ssp control implementations with export form

* remove comments

* Correct slugify import

* Security update Python 3.2.4 due to https://snyk.io/vuln/SNYK-PYTHON-DJANGO-1298665

* Polish SSP control CSV export form

Co-authored-by: Greg Elin <greg.elin@govready.com>

* Add 'Create a template' button to template library (#1610)

Co-authored-by: Greg Elin <greg.elin@govready.com>

* Content-Security-Policy header permit images (*), videos youtube, vimeo

* quick fix for auth

* quick fix for auth

* quick fix for auth

* quick fix for auth

* quick fix for auth

* Force controls csv to download to browser

* quick fix for auth

* quick fix for auth

* test

* test

* test

* test

* test

* last fix and vuln update for django

* last fix and vuln update for django

* 'Back' link to question to take user to previous question (#1612)

* 'Back' link to question to take user to previous question

* Update guidedmodules/views.py

Refactor pulling back_url into project_form

Co-authored-by: davidpofo <dampofo@umd.edu>

* Improve back-button styling

Co-authored-by: Greg Elin <Greg Elin>
Co-authored-by: davidpofo <dampofo@umd.edu>
Co-authored-by: Greg Elin <greg.elin@govready.com>

* WIP: Side-by-side comparison of components (#1620)

* created checkbox and form for submitting components for comparison. created rough start for displaying differences between prime component and rest

* for now just implementing two comparison

* click to read full text after 50 chars

* styling and added Control part

* displaying comparisons for x number of component statements against the prime component. Styling and abstracted out the comparison block into an included template

* check for pid

* removing detail/summary not really necessary

* Condense comparison listings into rows of a single table

Co-authored-by: Greg Elin <Greg Elin>

* Update CHANGELOG.md

* Rename 'compare' column to 'select' in component library (#1626)

Co-authored-by: Greg Elin <Greg Elin>

* Remove portfolio selection modal from Start a Project process

Start projects in user's default portfolio to reduce the clicks
starting a project.

Use the User.create_default_portfolio_if_missing method consistently
to consistently create the user portfolio default portfolio.

Remove the PortfolioSignupForm because registration is no longer
used in registering users.

Remove the '"project_form": AddProjectForm(request.user ...' passed
into many templates because the navbar start app option no longer
brings up the portfolio select modal.

* Update tests for default portfolio

* Bump VERSION, CHANGELOG

* Update CHANGELOG VERSION

* Add button, form to add AppSource via upload of zip file

Add button, form to App Store to provide front-end UI for
admininstrators to add an AppSource by uploading a zip file.
This simplifies setting up an AppSource for first time users.

Implementation only validates that uploaded directory is a zip
file, does not check if uploaded zip file is valid AppSource
directory structure.

Implementation assumes apps are in the 'apps' directory.

* Link to library version of component from a system's selected control component

* Display systems using a component (#1618)

* Display systems using a component

Add method controls.element.consuming_systems to produce list of systems
consuming (e.g., containing) the element.

Add tab to component library component detail page to display list of systems
containing the component.

Also, always display OSCAL tab in component library for component detail
(rather than conditional on 'enable_experimental_opencontrol' parameter).

* Show component system count in tab, better projects.exists query

* Replace list compression with query filters

Co-authored-by: Greg Elin <greg.elin@govready.com>
Co-authored-by: davidpofo <dampofo@umd.edu>

* Ge/fulltext search (#1631)

* Add fulltext smt search to component library search

* Note fulltext search in CHANGELOG

Co-authored-by: Greg Elin <Greg Elin>

* check if we are in a portfolio when starting a project. If so then use that portfolio and not the default for the user.

* fixed a bug where Elements of type system were shown in the selected components for a project

* Addressing github issue 1630 in group id matching. fixed a bug where Elements of type system were shown in the selected components for a project.

* Add YAML intermediary file for CMMC

* try/except to still do the component search for non-Postgres users. (#1633)

* Add a 'blank' project with no questions useful for batch project creation (#1634)

Co-authored-by: Greg Elin <Greg Elin>

* td not th

* Polish security objective ui

* Avoid errors when project has no root_task set

* Better project name when no root task set

* Align project name when listing project with no root task

* Support CMMC ver 1 OSCAL catalog

* Fix typo

* Add 'blank' compliance app to first_run

* Append '-dev' to version number

* Legacy Statements added as statements for import

* Updating regex

* Del size limit on speedyssp img upload

* updated column for imp statements

* Fix test shipped catalogs count

* td not th

* Revert "td not th"

This reverts commit e7e8b9c

* these values are safe

* removing extra differences obj.

* safe and efficiency

* adding select/deselect all. checkbox container wrap.

* control structure for compare button toggle

* Maintain sort order of compare_list otherwise Django will order ascending

* adding change component button to change what the prime component of comparison is. Still has work todo

* changed to allow user passed in for parsing

* remove commented out code from template

* Add UI for legacy statement display. Also fix StatementTypeEnum. (#1644)

* [WIP] UI to display legacy control impl smts

Create a conditional display of legacy control implementation
statements in control editor page.

Also widen width of display of editor control statements
to 1250px.

* Improve display of legacy statement

* StatementTypeEnum fixes. Closes #1643

Set all `StatementTypeEnum.<LABEL>.value` to `StatementTypeEnum.<LABEL>.name`
in order for relevant label/term to show up in Django database admin interface.

Set component library detail page Systems tab to not be inactive thereby
removing the content from the System tab showing up on the Control Implementation
Statements tab.

Update controls.tests.

Co-authored-by: Greg Elin <greg.elin@govready.com>

* Update CHANGELOG

* fixing styling of portfolio table

* using django guardian ObjectPermissionChecker to prefetch permissions. Directly check permissions, to avoid N+1 query of perms with get_obj_perms

* hide_registration revert

* formatting for sid

* Use StatementEnum.*.name value

* removing change component comparison button for now.

* implemented persistent storage of checks by changing value in hidden input with jquery. Clears storage after clicking compare button or deselecting all

* Use one import record for entire file

* More OSCALize id fixes. Proper Create/Update/Del of smts

* Display other_statement count on confirm import delete

* test test_portfolio_projects

* Add project, system.root_element to import_record

Add project and system.root_element to import_record
in order to auto delete the project and system (and root element)
when the import process for importing legacy control impl smts
also creates the project.

* name not value for statement enums

* Sometimes there are not parameters and that is okay it is caught by the try/except block.

* Captialize mission for test

* name not value for enums

* captial impact... Impact

* testing parse for version

* missed one get

* is_prerelease not dev release

* using is_prerelease works for checking dev

* need to force login as authenticated user and then reset login

* url

* snyk update to avoid SQL injection vuln found in Django 3.2.4

* check if previously checked and if so then don't hide compare button.

* fix conflicting migrations detected

* systems-security-sensitivity-level

* Fix controls/0052 StatementTypeEnum migration (#1648)

Co-authored-by: Greg Elin <Greg Elin>

* Update CHANGELOG.md (#1647)

* Configure users on install

New govready_users parameter in local/environment.json
to create sample users on install.

* Add Wazuh collection form to Assessments page (#1651)

* Add Wazuh info via end-user form

* Create SecurityService class to represent Security Service

Create `sec_srvc.SecurityService` class to represent a security service
from which data could be collected.

Add form to Assessments page to collect info from Wazuh SecurityService.

* Fix sec_srvc.py

* Abstracted and made a few improvements

* Fix uuid error

* Fix testing for fields

Co-authored-by: Greg Elin <greg.elin@govready.com>
Co-authored-by: Alexander Ward <alexander.ward1@gmail.com>

* checking for dev user creation pw. Create reg users not admin.

* Add CMMC baselines, assign baselines (#1649)

* Improve CMMC links, add OSCAL methods for link content

Improve CMMC catalog links to link to NIST 800-53 in GovReady.

Add methods to OSCAL catalog, get control_part, guidance links

Add get_control_part_by_name, get_control_guidance_links,
get_guidance_related_links_by_value_in_href, and
get_guidance_related_links_text_by_value_in_href to make getting
link content easier.

* Display related controls as links in control guidance

* Properly assign CMMC baselines

* Remove debugging print statements

* Fix typo

* Properly use StatementTypeEnum when saving smts

Co-authored-by: Greg Elin <greg.elin@govready.com>
Co-authored-by: Greg Elin <Greg Elin>

* first_run finishing touch

* Fix assessment summary link to wazuh (#1653)

* Add Wazuh info via end-user form

* Create SecurityService class to represent Security Service

Create `sec_srvc.SecurityService` class to represent a security service
from which data could be collected.

Add form to Assessments page to collect info from Wazuh SecurityService.

* Fix sec_srvc.py

* Abstracted and made a few improvements

* Fix uuid error

* Fix testing for fields

* Fix assessment summary link to wazuh

Co-authored-by: Greg Elin <greg.elin@govready.com>
Co-authored-by: Alexander Ward <alexander.ward1@gmail.com>

* Da/dropnfill (#1654)

* adding drag and fill for component import

* client-side filetype checking

* client-side file size checking 5MB max. missing div.

* missing listed catalog for CMMC. Delete extra migration. adjust test for drag-n-fill. import_project_submit for import project view/test

* json_content not id_file

* spelling

* del

* hot fix for external catalogs

* Remove baseline controls based on control's catalog_key. Fixes failure to remove controls from another catalog when resetting baselines. (#1655)

Co-authored-by: Greg Elin <greg.elin@govready.com>

* Update SpeedSSP ssp template for multiple catalogs (#1656)

Co-authored-by: Greg Elin <greg.elin@govready.com>

* Update admin.py

Readded AppInput

* new line fix

* fixed bug where id doesn't exist yet in db

* pinning jinja and installing compliance-trestle with unpinning of markupsafe in order to validate oscal 1.0.0.

* revert some changes to ssp-def for now and added source to statement model.

* ensure source and uuid are added correctly to import/export of component-definition

* adding oscal-version to element model. clean up output title

* replaced component-defintion for test data with official oscal 1.0.0 example component

* lowering the amount of output for circleci

* fixing exceptions

* update example link

* WIP on updating system-security-plan definition.

* missing uuid and 2 removed

* SSP export now includes the uuid and version from the root_element object

* fixing up some module logic to include real uuid and oscal version

* uuid not id

* Import component control statement even if catalog not found

Remove test to see of control exists in control catalog when importing
a component because we may import a component that has controls from
a catalog that is not yet in GovReady.

The test on the control id being in the catalog was originally done
to avoid importing a bad control (or bad control id). But it is worse
to not be able to import the component because we don't yet have the
a control catalog mentioned by the component.

* Display component, smts even if catalog missing

Do not crash on displaying a component and component
control implementation statement when a catalog
associated with statements is missing from GovReady-Q
install.

* Ge/data grid question (#1667)

* Improve appearance of data grid question

Display datagrid question wider and with smaller fonts.
Support datgrid specifying select type cell.

* Display legacy smt in system selected controls; fix component counts

Fix count on project system's components associated with a control (avoid double counting).

Display existance of legacy statement in project system's selected controls.

* Fix typo

Co-authored-by: Greg Elin <greg.elin@govready.com>

* Adjust test to new rule of importing controls with bad catalog

* natsorting implementation statements before grouping by sid. Providing statement's uuid. Ensuring
all requirements are added to final control implementation dictionary. dealing with empty or incorrect catalogs. Fixed up smt parse.

* If no statements are created then delete empty component

* OSCAL SSP almost implemented just need to finish implemented reqs.

* OSCALSystemSecurityPlanSerializer is getting there still have some fields to fill.

* added new function OSCAL_ssp_export in order to export a system's security plan in OSCAL, this replaces the usual JSON export. Added a several fields of data for OSCAL SSP.

* Coverage 6.0b1 starts to use a modern hash algorithm (sha256) when fingerprinting for high-security environments. Updating the requirements and Changelog.

* added a proxy for parties and responsible parties for component oscal export

* a couple tweaks for comp

* todo for ssp validation with trestle

* read validate ssp  with trestle

* revert discussion test change.

* extra file

* test_path?

* delete invalid test files

* fixing up implementation and testing of validation of extension.

* remove extra addition for .doc

* var sleep?

* bad test case

* adding some comments. Better logging/messaging for schema. Fixed splitting of control id.

* Added test of OSCAL ssp export.

* explicitly login as user

* test baseline json file should be test_baselines.json not baseline

* create system

* check part correctly. test fix

* get system from self

* try/except

* last try

* done

* Remove duplicate loads of select2 in base.html

* Da/cleanup export sspcsv (#1674)

* created a de-oscalizing function and applied to selected controls on import.

* some super route way of making sure the catalogs produce 3.1.

* add test of de_oscalize_control

* Da/discussion updates (#1675)

* get task for the attached object. added some more notes

* fixed signature for getting a task for the attached object.

* Added get_discussion_autocompletes changes to get the organization from the discussion(should be 1 to 1). If another models wants to implement it they can look at the get_discussion_autocompletes in TaskAnswer

* Added get_discussion_autocompletes changes to get the organization from the discussion(should be 1 to 1). If another models wants to implement it they can look at the get_discussion_autocompletes in TaskAnswer

* addressing shell script issues for dockerfile_exec_gunicorn.sh from GH issues 1659 (#1670)

Co-authored-by: root <root@MSI.localdomain>

* Some controls have characters that we currently don't expect. However it shouldn't just return an empty string as this errors out. Also the controls are already in oscal format. (#1676)

Co-authored-by: Greg Elin <greg.elin@govready.com>
Co-authored-by: alexanderward <alexander.ward1@gmail.com>
Co-authored-by: Greg Elin <Greg Elin>
Co-authored-by: mike <mike.guelfi@gmail.com>
Co-authored-by: Mike Guelfi <52943685+mguelfi@users.noreply.github.com>
Co-authored-by: Greg Elin <gregelin@govready.com>
Co-authored-by: Ward <12001004185765@FEDIDCARD.GOV>
Co-authored-by: root <root@MSI.localdomain>
  • Loading branch information
8 people committed Aug 6, 2021
1 parent f85b457 commit 356796f
Show file tree
Hide file tree
Showing 40 changed files with 1,296 additions and 747 deletions.
2 changes: 1 addition & 1 deletion .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ jobs:
name: All tests run in split
command: |
TESTFILES=$(circleci tests glob "test/**/*.py" | circleci tests split --split-by=timings --timings-type=filename)
coverage run --source='.' --branch -p manage.py test --verbosity=2 $TESTFILES -v 2
coverage run --source='.' --branch -p manage.py test --verbosity=1 $TESTFILES -v 2
# - run: coverage run --source='.' --branch -p manage.py test discussion
# Commenting out tests until better solution for testing after page loaded
#- run: coverage run --source='.' --branch -p manage.py test siteapp.tests.LandingSiteFunctionalTests
Expand Down
28 changes: 28 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
# Set the default behavior, in case people don't have core.autocrlf disabled.
* text eol=lf


#
## These files are binary and should be left untouched
#

# (binary is a macro for -text -diff)
*.png binary
*.jpg binary
*.jpeg binary
*.gif binary
*.ico binary
*.mov binary
*.mp4 binary
*.mp3 binary
*.flv binary
*.fla binary
*.swf binary
*.gz binary
*.zip binary
*.7z binary
*.ttf binary
*.eot binary
*.woff binary
*.pyc binary
*.pdf binary
25 changes: 25 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,31 @@
GovReady-Q Release Notes
========================


v0.9.7-dev (July xx, 2021)
--------------------------

**UI changes**

* Display datagrid question wider and with smaller fonts.
* Display existance of legacy statement in project system's selected controls.

**Developer changes**

* Support datagrid specifying select type cell.
* Added new function OSCAL_ssp_export in order to export a system's security plan in OSCAL, this replaces the usual JSON export. Added a several fields of data for OSCAL SSP.
* If a component to be imported has a catalog key that is not found in the internal or external catalog list then it will be skipped and logged
* If no statements are created the resulting element/component is deleted
* Component and System Security Plan exports pass OSCAL 1.0.0 schema validation
* Added a proxy for parties and responsible parties for component OSCAL export
* Coverage 6.0b1 starts to use a modern hash algorithm (sha256) when fingerprinting for high-security environments, upgrading to avoid this safety fail.
* Validate Component import and SSP with trestle the package

* **Bug fixes**

* Fix count on project system's components associated with a control (avoid double counting).


v0.9.6 (July 15, 2021)
----------------------

Expand Down
3 changes: 1 addition & 2 deletions VERSION
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
v0.9.6-dev

v0.9.7-dev
Binary file modified controls/data/catalogs/800-171-source.xlsx
Binary file not shown.
150 changes: 30 additions & 120 deletions controls/data/test_data/test_oscal_component.json
Original file line number Diff line number Diff line change
@@ -1,138 +1,48 @@
{
"component-definition": {
"uuid": "098040f9-a453-4854-ad88-f093bb683dae",
"uuid": "8223d65f-57a9-4689-8f06-2a975ae2ad72",
"metadata": {
"title": "Sample OSCAL for Testing",
"published": "2020-12-01T20:38:51+00:00",
"last-modified": "2020-12-01T20:25:29+00:00",
"version": "string",
"oscal-version": "1.0.0-milestone2"
"title": "Test Component Definition",
"last-modified": "2021-06-08T13:57:28.355446-04:00",
"version": "2020073",
"oscal-version": "1.0.0",
"parties": [
{
"uuid": "ee47836c-877c-4007-bbf3-c9d9bd805a9a",
"name": "Test Vendor",
"type": "organization"
}
]
},
"components": {
"098040f9-a453-4854-ad88-f093bb683dab": {
"components": [
{
"uuid": "b036a6ac-6cff-4066-92bc-74ddfd9ad6fa",
"type": "software",
"title": "Test OSCAL Component1",
"description": "This is a sample OSCAL component.",
"control-implementations": [
"title": "test component 1",
"description": "This is a software component that implements basic authentication mechanisms.",
"responsible-roles": [
{
"uuid": "0ab0b252-90d3-4d2c-9785-0c4efb254dfc",
"source": "NIST_SP-800-53_rev4",
"description": "Valid Catalog, Partial implementation of NIST_SP-800-53_rev4",
"implemented-requirements": [
{
"uuid": "1ab0b252-90d3-4d2c-9785-0c4efb254dfc",
"control-id": "ac-7",
"description": "Default statement description",
"remarks": "",
"statements" : {
"ac-7_smt.a": {
"uuid": "2ab0b252-90d3-4d2c-9785-0c4efb254dfc",
"description": "Part a description"
},
"ac-7_smt.b": {
"uuid": "3ab0b252-90d3-4d2c-9785-0c4efb254dfc",
"description": "Part b description"
}
},
"props": [
{
"name": "n/a",
"value": "test"
}
]
},
{
"uuid": "4ab0b252-90d3-4d2c-9785-0c4efb254dfc",
"control-id": "ac-17(9)",
"description": "Sample extended control",
"remarks": "",
"statements" : {
"ac-17(9)_smt.c": {
"uuid": "5ab0b252-90d3-4d2c-9785-0c4efb254dfc",
"description": "Part c of a sample control extension."
}
}
}
]
},
{
"uuid": "6ab0b252-90d3-4d2c-9785-0c4efb254dfc",
"source": "NIST_SP-800-53_rev5",
"description": "Valid Catalog, Partial implementation of NIST_SP-800-53_rev5",
"implemented-requirements": [
{
"uuid": "7ab0b252-90d3-4d2c-9785-0c4efb254dfc",
"control-id": "ac-7",
"description": "Default statement description",
"remarks": "",
"statements" : {
"ac-7_smt.d": {
"uuid": "8ab0b252-90d3-4d2c-9785-0c4efb254dfc",
"description": "Part d description"
}
}
}
"role-id": "supplier",
"party-uuids": [
"ee47836c-877c-4007-bbf3-c9d9bd805a9a"
]
}
]
},
"198040f9-a453-4854-ad88-f093bb683dab": {
"title": "Test OSCAL Component2",
"type": "software",
"description": "Sample Component #2 with invalid statements",
],
"control-implementations": [
{
"uuid": "9ab0b252-90d3-4d2c-9785-0c4efb254dfc",
"source": "SMPL_SP-800-53_rev20",
"description": "Invalid Catalog",
"implemented-requirements": [
{
"uuid": "0bb0b252-90d3-4d2c-9785-0c4efb254dfc",
"control-id": "ac-5",
"description": "Allow a user 5 login attempts before locking them out.",
"remarks": "",
"statements" : {
"ac-5_smt.d": {
"uuid": "1bb0b252-90d3-4d2c-9785-0c4efb254dfc",
"description": "Part d description"
}
},
"props": [
{
"name": "unused",
"value": "x"
}
]
}
]
},
{
"uuid": "2bb0b252-90d3-4d2c-9785-0c4efb254dfc",
"source": "NIST_SP-800-53_rev4",
"description": "Valid Catalog, Partial implementation of NIST_SP-800-53_rev4",
"uuid": "cfcdd674-8595-4f98-a9d1-3ac70825c49f",
"source": "../../../nist.gov/SP800-53/rev4/json/NIST_SP-800-53_rev4_catalog.json",
"description": "This is a partial implementation of the SP 800-53 rev4 catalog, focusing on the control enhancement AC-2 (3).",
"implemented-requirements": [
{
"uuid": "3bb0b252-90d3-4d2c-9785-0c4efb254dfc",
"control-id": "xz-0",
"description": "Invalid Control ID",
"remarks": "",
"statements" : {
"xz-0_smt.d": {
"uuid": "4bb0b252-90d3-4d2c-9785-0c4efb254dfc",
"description": "Part d description"
}
},
"props": [
{
"name": "unused",
"value": "x"
}
]
"uuid": "d1016df0-9b5c-4839-86cd-f9c1d113077b",
"description": "Inactive accounts are automatically disabled based on the duration specified by the duration parameter. Disabled accounts are expected to be reviewed and removed when appropriate.",
"control-id": "ac-2.3"
}
]
}
]
}
}
]
}
}
}
2 changes: 1 addition & 1 deletion controls/management/commands/importcomponents.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ def handle(self, *args, **options):
elif FORMAT == "csv":
import csv
counter = 0
pprint(f"Format '{FORMAT}' not yet supported.")
print(f"Format '{FORMAT}' not yet supported.")
else:
print(f"Format '{FORMAT}' not yet supported.")

Expand Down
33 changes: 33 additions & 0 deletions controls/migrations/0055_auto_20210726_2246.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
# Generated by Django 3.2.5 on 2021-07-26 22:46

from django.db import migrations, models


class Migration(migrations.Migration):

dependencies = [
('controls', '0054_merge_0052_auto_20210521_1422_0053_auto_20210701_1133'),
]

operations = [
migrations.AddField(
model_name='historicalstatement',
name='source',
field=models.CharField(blank=True, help_text="Statement source such as '../../../nist.gov/SP800-53/rev4/json/NIST_SP-800-53_rev4_catalog.json'.", max_length=200, null=True),
),
migrations.AddField(
model_name='statement',
name='source',
field=models.CharField(blank=True, help_text="Statement source such as '../../../nist.gov/SP800-53/rev4/json/NIST_SP-800-53_rev4_catalog.json'.", max_length=200, null=True),
),
migrations.AlterField(
model_name='historicalstatement',
name='statement_type',
field=models.CharField(blank=True, choices=[('CONTROL_IMPLEMENTATION', 'control_implementation'), ('CONTROL_IMPLEMENTATION_LEGACY', 'control_implementation_legacy'), ('CONTROL_IMPLEMENTATION_PROTOTYPE', 'control_implementation_prototype'), ('ASSESSMENT_RESULT', 'assessment_result'), ('POAM', 'POAM'), ('SECURITY_SENSITIVITY_LEVEL', 'security_sensitivity_level'), ('SECURITY_IMPACT_LEVEL', 'security_impact_level')], help_text='Statement type.', max_length=150, null=True),
),
migrations.AlterField(
model_name='statement',
name='statement_type',
field=models.CharField(blank=True, choices=[('CONTROL_IMPLEMENTATION', 'control_implementation'), ('CONTROL_IMPLEMENTATION_LEGACY', 'control_implementation_legacy'), ('CONTROL_IMPLEMENTATION_PROTOTYPE', 'control_implementation_prototype'), ('ASSESSMENT_RESULT', 'assessment_result'), ('POAM', 'POAM'), ('SECURITY_SENSITIVITY_LEVEL', 'security_sensitivity_level'), ('SECURITY_IMPACT_LEVEL', 'security_impact_level')], help_text='Statement type.', max_length=150, null=True),
),
]
18 changes: 18 additions & 0 deletions controls/migrations/0056_element_oscal_version.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# Generated by Django 3.2.5 on 2021-07-26 23:38

from django.db import migrations, models


class Migration(migrations.Migration):

dependencies = [
('controls', '0055_auto_20210726_2246'),
]

operations = [
migrations.AddField(
model_name='element',
name='oscal_version',
field=models.CharField(blank=True, default='1.0.0', help_text='OSCAL version number.', max_length=20, null=True),
),
]
2 changes: 2 additions & 0 deletions controls/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ class SystemException(Exception):
class Statement(auto_prefetch.Model):
sid = models.CharField(max_length=100, help_text="Statement identifier such as OSCAL formatted Control ID", unique=False, blank=True, null=True)
sid_class = models.CharField(max_length=200, help_text="Statement identifier 'class' such as 'NIST_SP-800-53_rev4' or other OSCAL catalog name Control ID.", unique=False, blank=True, null=True)
source = models.CharField(max_length=200, help_text="Statement source such as '../../../nist.gov/SP800-53/rev4/json/NIST_SP-800-53_rev4_catalog.json'.", unique=False, blank=True, null=True)
pid = models.CharField(max_length=20, help_text="Statement part identifier such as 'h' or 'h.1' or other part key", unique=False, blank=True, null=True)
body = models.TextField(help_text="The statement itself", unique=False, blank=True, null=True)
statement_type = models.CharField(max_length=150, help_text="Statement type.", unique=False, blank=True, null=True, choices=StatementTypeEnum.choices())
Expand Down Expand Up @@ -223,6 +224,7 @@ class Element(auto_prefetch.Model, TagModelMixin):
roles = models.ManyToManyField('ElementRole', related_name='elements', blank=True, help_text="Roles assigned to the Element")
created = models.DateTimeField(auto_now_add=True, db_index=True)
updated = models.DateTimeField(auto_now=True, db_index=True)
oscal_version = models.CharField(default="1.0.0", max_length=20, help_text="OSCAL version number.", unique=False, blank=True, null=True)
uuid = models.UUIDField(default=uuid.uuid4, editable=True, help_text="A UUID (a unique identifier) for this Element.")
import_record = auto_prefetch.ForeignKey(ImportRecord, related_name="import_record_elements", on_delete=models.CASCADE,
unique=False, blank=True, null=True, help_text="The Import Record which created this Element.")
Expand Down
Loading

0 comments on commit 356796f

Please sign in to comment.