From 356796f6b8504ba0e0e46cb71ab5add88d81a418 Mon Sep 17 00:00:00 2001 From: davidpofo Date: Fri, 6 Aug 2021 15:48:11 -0400 Subject: [PATCH 1/2] Release/v0.9.7 (#1677) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * 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 * 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 Co-authored-by: Greg Elin * Align Delete section on project settings (#1604) Co-authored-by: Greg Elin * 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 * 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 * Add 'Create a template' button to template library (#1610) Co-authored-by: Greg Elin * 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 * Improve back-button styling Co-authored-by: Greg Elin Co-authored-by: davidpofo Co-authored-by: Greg Elin * 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 * Update CHANGELOG.md * Rename 'compare' column to 'select' in component library (#1626) Co-authored-by: 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 Co-authored-by: davidpofo * Ge/fulltext search (#1631) * Add fulltext smt search to component library search * Note fulltext search in CHANGELOG Co-authored-by: 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 * 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 e7e8b9c5 * 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.