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

File watcher #27

Draft
wants to merge 7 commits into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -39,3 +39,8 @@ repos:
.*/.*_test\.py|
.*/.*test_.*\.py
)$
- repo: https://github.com/python-poetry/poetry-plugin-export
rev: 1.9.0
hooks:
- id: poetry-export
args: ["-f", "requirements.txt", "-o", "requirements.txt"]
31 changes: 31 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
FROM python:3.10-slim AS python-base

RUN apt update && apt install -y --no-install-recommends \
gcc \
g++ \
libffi-dev \
musl-dev \
build-essential \
&& apt clean && rm -rf /var/lib/apt/lists/*

ENV PYTHONUNBUFFERED=1 \
PYTHONDONTWRITEBYTECODE=1 \
PIP_NO_CACHE_DIR=off \
POETRY_VERSION=2.0.1 \
POETRY_HOME="/opt/poetry" \
POETRY_VIRTUALENVS_IN_PROJECT=true \
POETRY_NO_INTERACTION=1

RUN pip install "poetry==$POETRY_VERSION"

ENV PATH="$POETRY_HOME/bin:$PATH"

WORKDIR /app

COPY . ./

RUN poetry config virtualenvs.create false

RUN poetry install

CMD ["python", "tools/watcher.py"]
371 changes: 0 additions & 371 deletions appendices/configuration-management.md

This file was deleted.

10 changes: 10 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
services:
file_watcher:
user: 1000:1000
environment:
- UID=1000
- GID=1000
build: .
volumes:
- .:/app
command: python tools/watcher.py
62 changes: 62 additions & 0 deletions file_hashes.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
{
"results/components/Ilias/AC-ACCESS_CONTROL.yaml": "eb748508d342f18cd21d5e445dbe9e45114ac2515ad636930cca90b7adceaca1",
"results/components/Ilias/SA-SYSTEM_AND_SERVICES_ACQUISITION.yaml": "d20458ce08debedc72ff652d1a535de8f97c90746c4c8206156e866a26a939b3",
"results/components/Ilias/CA-ASSESSMENT_AUTHORIZATION_AND_MONITORING.yaml": "e641b1d866965599072286edf9b71da620253f5f82c48c1fefd9fa62aa98e6d5",
"results/components/Ilias/SI-SYSTEM_AND_INFORMATION_INTEGRITY.yaml": "12de7a82fc3db6d09fe3de5ccb89f6a1f20412a50103a11252b85b58b83f00d3",
"results/components/Ilias/CM-CONFIGURATION_MANAGEMENT.yaml": "0f505bf2bc62ed2e32045d16f04ccac8047f118997f159f2f8369960a60d16f1",
"results/components/Ilias/IA-IDENTIFICATION_AND_AUTHENTICATION.yaml": "12e90d0a8c03a74af1e7b3829f86dbf725099957c63379da4ed3d6cf3571c528",
"results/components/Ilias/AU-AUDIT_AND_ACCOUNTABILITY.yaml": "c39fe64def72de7574efcaeb73410a974efceedfe4db629843f59c5737f5ee0c",
"results/components/Ilias/SC-SYSTEM_AND_COMMUNICATIONS_PROTECTION.yaml": "2b56730761627706fd056ec3ccca0df10822fdfabd69a737ef36a933186246de",
"results/components/SSH/AC-ACCESS_CONTROL.yaml": "a2abec71d44ab7c288f9d8e266443e93b25f9fa9f8c81641a51e8e3c95e85a48",
"results/components/Drupal/AC-ACCESS_CONTROL.yaml": "5a11744d9d01658f70ca12f28c65291d89acefdaa9de3c4e7a0189b3b3798ad3",
"results/components/Drupal/CA-ASSESSMENT_AUTHORIZATION_AND_MONITORING.yaml": "3f926d8953fbe1f9baa29847a878e23642cb7275247c5d495d24e2ae19a87714",
"results/components/Drupal/IA-IDENTIFICATION_AND_AUTHENTICATION.yaml": "35e5deac4a1ad9e18aa59c23c851d7fa7700bac6a1edfcbfb17253db217ac955",
"results/components/Drupal/AU-AUDIT_AND_ACCOUNTABILITY.yaml": "b457aef053559720d39975d2b0c31eea0b135a998c07daf3bf54c0122f023429",
"results/components/Drupal/SC-SYSTEM_AND_COMMUNICATIONS_PROTECTION.yaml": "d1c307662d0634bcb30a188247b367bac40288443201ab4d52253d75fc92a293",
"results/components/Contractor/AC-ACCESS_CONTROL.yaml": "c6aeb080c95bb631e44e86d3b7ff2fbc36e68d19f174af33a2861b21a3cb8799",
"results/components/Contractor/MA-MAINTENANCE.yaml": "4ade84b3f40a9ae41c8c0513fb6c302382f75309b102bd370cf7535a84c82ef9",
"results/components/Contractor/IR-INCIDENT_RESPONSE.yaml": "dea38dd5a63bc323ce26ac3b1a687767d103c14ac4a4e96e1a829e71a54b70ae",
"results/components/Contractor/SA-SYSTEM_AND_SERVICES_ACQUISITION.yaml": "5695af3c5dbea7c9b14f59b2f089179070b439d633af76d8879d33f206a8d6dc",
"results/components/Contractor/PL-PLANNING.yaml": "6dffc9e49ba5fbe5043d055fcceb923386aac5bc702515adda05adfd5367c2b1",
"results/components/Contractor/CP-CONTINGENCY_PLANNING.yaml": "700ecbcc67bab76df92676a1d82af649123eb560ba32f1d86c167280b09bf71d",
"results/components/Contractor/CA-ASSESSMENT_AUTHORIZATION_AND_MONITORING.yaml": "ef261da6d58de7c3ec9908f347567b6be13a66108c56da10c7e06c1efd5b2161",
"results/components/Contractor/RA-RISK_ASSESSMENT.yaml": "4b0d231ee7690bf3f960970c96daec42e9bf486451c3f76f53cd968765fbc7c0",
"results/components/Contractor/SI-SYSTEM_AND_INFORMATION_INTEGRITY.yaml": "2556e2004dfb576901c68afa1b5c81207bcdd353dd96783acc04126f5561e2b4",
"results/components/Contractor/AT-AWARENESS_AND_TRAINING.yaml": "cb44b63d57337f80d00e868bd1624cd9c512d44af67debf6f532b677a1758bc6",
"results/components/Contractor/CM-CONFIGURATION_MANAGEMENT.yaml": "49c0d32cec6b88c37f9f51315f1a19c55bba99e7bda3cc0ff287b9b231f49bcc",
"results/components/Contractor/IA-IDENTIFICATION_AND_AUTHENTICATION.yaml": "9b2d4d107fd6dcfa125e79673f268d1717bc95090e9a33276fc7ac15cbd57393",
"results/components/Contractor/PS-PERSONNEL_SECURITY.yaml": "a85e543ad80632af224c4e8713708dbaa05138f2fdea62e4190d0daddd4c2568",
"results/components/Contractor/AU-AUDIT_AND_ACCOUNTABILITY.yaml": "b6ce8babcfe24b98d71802679a452608ac9380e2d5aa84eaf70bc9efdfcfa901",
"results/components/Contractor/SC-SYSTEM_AND_COMMUNICATIONS_PROTECTION.yaml": "097da940c8e5e64f5624773e965c6ec103560f50c1bf4012896565f5ce9dc9db",
"results/components/Contractor/MP-MEDIA_PROTECTION.yaml": "2c84daaae84529c836b69f5518459daa01097e36585b66f5d637a9fd0fab8a38",
"results/components/AWS/AC-ACCESS_CONTROL.yaml": "06a4a18eee5206bc005ba8ef92a65f64b604970eeecf017aa795d36d0d31f43a",
"results/components/AWS/MA-MAINTENANCE.yaml": "f499dc014605441ce67dd022618b5cd5722cc50adab0cdda7edf78ea227d0e52",
"results/components/AWS/IR-INCIDENT_RESPONSE.yaml": "f01126d9d6f62650a0d21a9e9faa039c038ac1950d0befb16e02494164ba6212",
"results/components/AWS/SA-SYSTEM_AND_SERVICES_ACQUISITION.yaml": "9d21d5335c2f275c5d7b0e4dfff343fa906d163d54804127c8098a7e8b9cc242",
"results/components/AWS/PL-PLANNING.yaml": "978b1b1da9a5370a922e365d508f9a784671335b7bfdb860024c2d5a9364a86d",
"results/components/AWS/CP-CONTINGENCY_PLANNING.yaml": "a91c43d0093f2f36301be5d627e66f3723cd391ea143368b1a3eb1ab4ee37ee0",
"results/components/AWS/PE-PHYSICAL_AND_ENVIRONMENTAL_PROTECTION.yaml": "2dd3d5c4045330449ae6475816974de9b2ec1de450760dcb0919efbc794efe0c",
"results/components/AWS/RA-RISK_ASSESSMENT.yaml": "cd29902c52bb85a2843146ddd4ae47888326e6e7190b9ea29a737732ebb19269",
"results/components/AWS/CM-CONFIGURATION_MANAGEMENT.yaml": "c7d16b9cae5b392d00c16206b2a4608701dbfa4eca61c76b638ca8dfabf1e0ac",
"results/components/AWS/IA-IDENTIFICATION_AND_AUTHENTICATION.yaml": "4ce0780095c39fd82c5fd24eef14c904848b01e515b27a6a566560efaaf5e298",
"results/components/AWS/PS-PERSONNEL_SECURITY.yaml": "2f5a7fc5807933e94b5396ab89d3672c55808c38e3a19c3e87c26748e7b8f6c1",
"results/components/AWS/AU-AUDIT_AND_ACCOUNTABILITY.yaml": "062516255d29e61e320158144d0855e2f4e21c3ad441a864ac459207913989e6",
"results/components/AWS/SC-SYSTEM_AND_COMMUNICATIONS_PROTECTION.yaml": "7b3a7b1bfa6da7550d674c3e0d05b3a1363e960007c232e7b70151c1bb82a23c",
"results/components/AWS/MP-MEDIA_PROTECTION.yaml": "f8915a6fee95a8525d4d84b71645ead6f5afe688c25ffc83c1586bd758fa2ca2",
"results/components/Project/AC-ACCESS_CONTROL.yaml": "d35b5de1d7e8f7da1634b01be29789803cd6430c37cfd16d68a79cca33a1138b",
"results/components/Project/MA-MAINTENANCE.yaml": "272908e5d88645afc5d5e1906b9c2ae2e0e637deae9d4d2333144281c9ac56e0",
"results/components/Project/IR-INCIDENT_RESPONSE.yaml": "851c93e672447c5383861d8bba41a0a7c5f01c49f50e993027c81c4c41936bd6",
"results/components/Project/SA-SYSTEM_AND_SERVICES_ACQUISITION.yaml": "d625282f3528abb853b4798c1ee42d0fd9b8730855b857b1003c79c5abf73dad",
"results/components/Project/PL-PLANNING.yaml": "50df730d0bf4b6166f5e2a7c4ced5016d39b7615c6dc613b524bcc9705aa02fd",
"results/components/Project/CP-CONTINGENCY_PLANNING.yaml": "94e88737c94063e79e6ed64f076f282bae3cad5414e1bf2c1b87d60158e86f56",
"results/components/Project/CA-ASSESSMENT_AUTHORIZATION_AND_MONITORING.yaml": "7d6668df389d9be22f87152c5edb3b4ffc0313ac07a97b041c031bb1296788b6",
"results/components/Project/RA-RISK_ASSESSMENT.yaml": "5623411fb4e491c9c6597f32f6159c655210980c9fc4fe23deab7d423f80a997",
"results/components/Project/SI-SYSTEM_AND_INFORMATION_INTEGRITY.yaml": "70580f2e8a76a1d570c732fe722b9875fa01bffb4a226d97cd1afa60ebe08b13",
"results/components/Project/AT-AWARENESS_AND_TRAINING.yaml": "76b04f7278bd8ee53fa5d6b9cedbee7a9995db7f62e735c123827a5ef97ac9f9",
"results/components/Project/CM-CONFIGURATION_MANAGEMENT.yaml": "d79360666136b94da3c1d1b032a0b945c9c35879de5997c7ce3243205309645b",
"results/components/Project/IA-IDENTIFICATION_AND_AUTHENTICATION.yaml": "9a0a068bfeb7579d4cb977c1a92541c9e453f64f729877ab7536f0a2feb33ca4",
"results/components/Project/PS-PERSONNEL_SECURITY.yaml": "e825d46bf0971d86061ce7404bdcd05fb5ae828192348eaaafa437e852e1e297",
"results/components/Project/AU-AUDIT_AND_ACCOUNTABILITY.yaml": "cda0181f16af89445ffee5b437e45b22ad2dd076a105669c0a84c1c5226e3ea4",
"results/components/Project/SC-SYSTEM_AND_COMMUNICATIONS_PROTECTION.yaml": "e101eae0c859c4d56b7a4753d7d98962e02ed2f00be23a9c55d43fec8bdc95cf",
"results/components/Project/MP-MEDIA_PROTECTION.yaml": "89c7778af7c08d7ebb4b0d2b0aec0641dc65c6b46126baa558b0f45e5962996e"
}
12 changes: 6 additions & 6 deletions opencontrol.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,12 @@ metadata:
maintainers:
- CivicActions
components:
- ./components/AWS
- ./components/Contractor
- ./components/Drupal
- ./components/Ilias
- ./components/Project
- ./components/SSH
- ./results/components/AWS
- ./results/components/Contractor
- ./results/components/Drupal
- ./results/components/Ilias
- ./results/components/Project
- ./results/components/SSH
standards:
- ./standards/nist-sp-800-53-rev5.yaml
certifications:
Expand Down
50 changes: 46 additions & 4 deletions poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 4 additions & 3 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -22,17 +22,18 @@ complianceio = {git = "https://github.com/CivicActions/compliance-io.git"}
pytest = "^7.4.0"
pypandoc = "^1.11"
poetry-core = "^2.0.1"
watchdog = "^6.0.0"

[build-system]
requires = ["poetry-core"]
build-backend = "poetry.core.masonry.api"

[tool.poetry.scripts]
createfiles = "tools.createfiles.createfiles:main"
createfiles = "tools.createfiles.createfiles:create_files"
creatematrix = "tools.creatematrix.creatematrix:main"
exportto = "tools.exportto.exportto:main"
makefamilies = "tools.makefamilies.makefamilies:main"
sop = "tools.sop.sop:main"
makefamilies = "tools.makefamilies.makefamilies:make_families"
sop = "tools.sop.sop:sop"
makessp = "tools.makessp.makessp:main"
getconfig = "tools.helpers.config:check_config"

Expand Down
Loading