A small package that allows you to easily edit STIG (CKL files) quickly.
Project description
STIG EDIT
Description
The purpose of this package is to allow you to quickly and easily edit STIG files (in ckl format). With this you can read and make changes to the target data within the check list. You can also make changes to individual checks.
Editable Fields
The following fields are able to be modified with this package:
Target Data
| Available Targets | Available Fields | Examples |
|---|---|---|
| ROLE | None, Workstation, Member Server, Domain Controller | Member Server |
| ASSET_TYPE | Computing, Non-Computing | Computing |
| MARKING | Any | CUI |
| HOST_NAME | Any | test_hostname1 |
| HOST_IP | Any | 192.168.1.5 |
| HOST_MAC | Any | 00:00:5e:00:53:af |
| HOST_FQDN | Any | test_hostname1.example.com |
| TARGET_COMMENT | Any | This is a test server. |
| TECH_AREA | See footnote for options. 1 | UNIX OS |
| WEB_OR_DATABASE | true, false | false |
| WEB_DB_SITE | Any (Only if WEB_OR_DATABASE is set to true) | Chicago |
| WEB_DB_INSTANCE | Any (Only if WEB_OR_DATABASE is set to true) | test01 |
vKey Data
| Available to Edit | Available Fields | Examples |
|---|---|---|
| STATUS | Not_Reviewed, Not_Applicable, NotAFinding, Open | NotAFinding |
| FINDING_DETAILS | Any | The check returned no results |
| COMMENTS | Any | Fixed on July 4, 1776 |
Modules Available
read_target_data(filename)
This module returns all target data for the ckl file that is parsed.
| Parameters | Description | Examples | Required |
|---|---|---|---|
| filename | Filename of CKL file to parse. | testfile.txt | yes |
Example
import ckl_editor
print(ckl_editor.read_target_data("test.ckl"))
write_target_data(file_name, key, value)
This module can write to any of the Target Data fields shown in the Editable Fields/Target Data section. Note the values because some fields must match a list of predefined values or the STIG Viewer will not be able to open the file.
Before running this module, you need to run the load_target_data() module and use that as the input for target_list.
| Parameters | Description | Examples | Required |
|---|---|---|---|
| filename | Filename of CKL file to parse. | testfile.txt | yes |
| key | Target field name that you want to edit | ROLE | yes |
| value | The value that you want to set the target field to | Workstation | yes |
Example
import ckl_editor
ckl_editor.write_target_data(file_name="test.ckl", key="ROLE", value="Member Server")
write_vkey_data(file_name, key, status, finding_details, comments)
This module can write status, finding_details, and comments to any vkey that exists in your CKL file. It will error out if the vkey does not exists. Some of the fileds such as status have a list of predefined values you must use or the STIG Viewer will not be able to open the file.
Before running this module, you need to run the load_vkey_data() module and use that as the input for vkeylist.
| Parameters | Description | Examples | Required |
|---|---|---|---|
| filename | Filename of CKL file to parse. | testfile.txt | yes |
| key | The vkey that you want to edit in the checklist | V-230222 | yes |
| status | The value that you want to set the status to. | NotAFinding | yes |
| finding_details | Any information you want to put in the finding details | The check returned no results. | yes |
| comments | Any information you want to put in the comments | Fixed on July 4, 1776 | yes |
import ckl_editor
ckl_editor.write_vkey_data(file_name="test.ckl", key="V-230222", status="Not_Reviewed", finding_details="Server was patched.\nThis is not a finding", comments="No Comment.")
-
TECH_AREA Options: Application Review, Boundary Security, CDS Admin Review, CDS Technical Review, Database Review, Domain Name System (DNS), Exchange Server, Host Based System Security (HBSS), Internal Network, Mobility, Releasable Networks (REL), Traditional Security, UNIX OS, VVOIP Review, Web Review, Windows OS, Other Review ↩
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file stig_edit-1.0.6.tar.gz.
File metadata
- Download URL: stig_edit-1.0.6.tar.gz
- Upload date:
- Size: 148.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.11.4
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5ce089c076fbe19e71c0561e4e5f7686647d8652aea4e547a38367a07fdc38bc
|
|
| MD5 |
959793081a74d960ccd94d67eb1b3be6
|
|
| BLAKE2b-256 |
9c75a6bc342198f486faf7daede9f69fdebee76f35c74c41efdbf971b5a894c0
|
File details
Details for the file stig_edit-1.0.6-py3-none-any.whl.
File metadata
- Download URL: stig_edit-1.0.6-py3-none-any.whl
- Upload date:
- Size: 5.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.11.4
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
fbffa76583c9e5789cae95a801ffec67db066e32f797449062e09296982a607d
|
|
| MD5 |
f176e403b46080f8f6db54b80a608b6d
|
|
| BLAKE2b-256 |
64c3798e4230bd4dcad05a23439c49ee32810378c8698e416d75deb339f979fb
|