GithubHelp home page GithubHelp logo

eop-omb / opal Goto Github PK

View Code? Open in Web Editor NEW
24.0 24.0 12.0 73.01 MB

OSCAL Policy Administration Library (OPAL) provides a simple web application for managing System Security Plans. The data modle is based on the OSCAL standard.

License: Other

Dockerfile 0.10% Python 96.73% Shell 0.04% HTML 3.13%
oscal security-tools ssp

opal's People

Contributors

cs4p avatar dan-omb avatar dependabot[bot] avatar joe-omb avatar mogul avatar openbrian avatar samirari avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

opal's Issues

Permission error

After following the installation instruction using docker container and running the command to start the container I get the following error:

PermissionError: [Errno 13] Permission denied: '/usr/src/app/debug.log'

Complete log:

2024-03-22 12:17:04 + set -e
2024-03-22 12:17:04 + python manage.py migrate --noinput
2024-03-22 12:17:04 Running in Development mode!
2024-03-22 12:17:04 DJANGO_SETTINGS_MODULE: opal.settings
2024-03-22 12:17:04 GPG_KEY: <** removed by me ** >
2024-03-22 12:17:04 HOME: /home/opal
2024-03-22 12:17:04 HOSTNAME: d22b222e39c4
2024-03-22 12:17:04 LANG: C.UTF-8
2024-03-22 12:17:04 PATH: /usr/local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
2024-03-22 12:17:04 PWD: /usr/src/app
2024-03-22 12:17:04 PYTHONDONTWRITEBYTECODE: 1
2024-03-22 12:17:04 PYTHONUNBUFFERED: 1
2024-03-22 12:17:04 PYTHON_GET_PIP_SHA256: <** removed by me **
2024-03-22 12:17:04 PYTHON_GET_PIP_URL: https://github.com/pypa/get-pip/raw/dbf0c85f76fb6e1ab42aa672ffca6f0a675d9ee4/public/get-pip.py
2024-03-22 12:17:04 PYTHON_PIP_VERSION: 24.0
2024-03-22 12:17:04 PYTHON_SETUPTOOLS_VERSION: 65.5.1
2024-03-22 12:17:04 PYTHON_VERSION: 3.11.8
2024-03-22 12:17:04 SHLVL: 1
2024-03-22 12:17:04 _: /usr/local/bin/python
2024-03-22 12:17:04 Traceback (most recent call last):
2024-03-22 12:17:04 File "/usr/local/lib/python3.11/logging/config.py", line 573, in configure
2024-03-22 12:17:04 handler = self.configure_handler(handlers[name])
2024-03-22 12:17:04 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2024-03-22 12:17:04 File "/usr/local/lib/python3.11/logging/config.py", line 757, in configure_handler
2024-03-22 12:17:04 result = factory(**kwargs)
2024-03-22 12:17:04 ^^^^^^^^^^^^^^^^^
2024-03-22 12:17:04 File "/usr/local/lib/python3.11/logging/init.py", line 1181, in init
2024-03-22 12:17:04 StreamHandler.init(self, self._open())
2024-03-22 12:17:04 ^^^^^^^^^^^^
2024-03-22 12:17:04 File "/usr/local/lib/python3.11/logging/init.py", line 1213, in _open
2024-03-22 12:17:04 return open_func(self.baseFilename, self.mode,
2024-03-22 12:17:04 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2024-03-22 12:17:04 PermissionError: [Errno 13] Permission denied: '/usr/src/app/debug.log'
2024-03-22 12:17:04
2024-03-22 12:17:04 The above exception was the direct cause of the following exception:
2024-03-22 12:17:04
2024-03-22 12:17:04 Traceback (most recent call last):
2024-03-22 12:17:04 File "/usr/src/app/manage.py", line 22, in
2024-03-22 12:17:04 main()
2024-03-22 12:17:04 File "/usr/src/app/manage.py", line 18, in main
2024-03-22 12:17:04 execute_from_command_line(sys.argv)
2024-03-22 12:17:04 File "/usr/local/lib/python3.11/site-packages/django/core/management/init.py", line 442, in execute_from_command_line
2024-03-22 12:17:04 utility.execute()
2024-03-22 12:17:04 File "/usr/local/lib/python3.11/site-packages/django/core/management/init.py", line 416, in execute
2024-03-22 12:17:04 django.setup()
2024-03-22 12:17:04 File "/usr/local/lib/python3.11/site-packages/django/init.py", line 19, in setup
2024-03-22 12:17:04 configure_logging(settings.LOGGING_CONFIG, settings.LOGGING)
2024-03-22 12:17:04 File "/usr/local/lib/python3.11/site-packages/django/utils/log.py", line 76, in configure_logging
2024-03-22 12:17:04 logging_config_func(logging_settings)
2024-03-22 12:17:04 File "/usr/local/lib/python3.11/logging/config.py", line 823, in dictConfig
2024-03-22 12:17:04 dictConfigClass(config).configure()
2024-03-22 12:17:04 File "/usr/local/lib/python3.11/logging/config.py", line 580, in configure
2024-03-22 12:17:04 raise ValueError('Unable to configure handler '
2024-03-22 12:17:04 ValueError: Unable to configure handler 'file'

Inheriting control statements

Scenario: system a inherits from system b. I create a new statement for a control in system a, it is linked to the baseline control instead of a new control. This causes the naming convention to fail but also the new control is propagated to all other systems that inherit from b

Word Documents are treated as PDF files when trying to display or download

Describe the bug
The system treats all documents as PDF when retrieving them from the database. A .pdf extension is applied to the temporary file which causes the browser to return an error.

To Reproduce
Steps to reproduce the behavior:

  1. Upload a word document
  2. Click on the link for the new document
  3. Note the inline display has an error
  4. click on the Download link to see another error

Expected behavior
Since OPAL is intended as a repository and not a tool for working on live attachments. It might make the most sense to limit uploads to PDF or to convert files to PDF on upload.

Visualizing the model

Not an issue, but I thought I'd share something...

django-extensions is already part of the project. I ran a few commands and generated an SVG of the model classes. You'll need graphviz on your machine to run dot.

python manage.py graph_models -g ssp > opal.dot
dot -T svg opal.dot > opal.svg

It's a big image. Here's a snippet.

image

Imported catalog not showing up when generating an SSP

I've installed OPAL locally based on the instructions in the repo. I'm able to go to "NIST Catalog" on the site and import the following catalog:

https://github.com/EOP-OMB/opal/blob/main/media/uploads/catalogs/NIST_SP-800-53_rev5-FPD_LOW-baseline-resolved-profile_catalog.json

After import, the control baseline does appear correctly in the admin section:

image

image

image

However, when I try to create a new SSP, none of the controls are showing up:

image

image

Is there something I need to do after importing the catalog to be able to select the controls?

Open to a PR to streamline usage with Docker?

@dan-omb Hi. Any interest in a PR to streamline usage with Docker?

  • rearrange layers to reduce image build size (1.22GB -> 0.56GB?) and faciliate layer caching for faster rebuilds
  • remove extraneous packages added during the build
  • cleanup package (apt, pip) install cache
  • run as an unprivileged user
  • tweak ENTRYPOINT and CMD to make Django play nice with Docker

Add categorization

Each system is rated according to FIPS 199. It would be nice to pick the system categorization and have a set of controls automatically become selected accordingly.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.