This script is used to export Plan of Actions and Milestones (POAM) items from a Security Plan (SSP) in the RegScale system to an Excel file in the FedRAMP v5 format.
- Python 3.9+
- openpyxl
- regscale-cli
#!/usr/bin/env python | |
import argparse | |
from rich.console import Console | |
from rich.table import Table | |
from rich.panel import Panel | |
from rich.text import Text | |
from regscale.models.regscale_models.asset import Asset | |
from regscale.models.regscale_models.issue import Issue |
import json | |
import re | |
with open("somefile.json", 'r', encoding='utf-8) as f: | |
s = f.read() | |
# Original code here by tobias_k: https://stackoverflow.com/questions/18514910/how-do-i-automatically-fix-an-invalid-json-string | |
while True: | |
try: |
import asyncio | |
# Async operation definition remains the same | |
async def async_operation(): | |
print("Starting async operation") | |
await asyncio.sleep(1) | |
print("Async operation completed") | |
#!/bin/bash | |
set -euo pipefail | |
if [ "$EUID" -ne 0 ] | |
then echo "Please run as root" | |
exit | |
fi |
GWX 3.0 | |
Once you created a symlink with no space in its name, you can install GWX using its installer, pointing to that symlink instead of the default silent hunter 3 install location (which contains spaces, and other characters nobody should use) | |
If you just install GWX, it will start in 4:3 resolution ; to make it work in proper 1920x1080 resolution, i tried multiple widescreen "mods" (dll + GUI) ; the only one that worked and gave me a UI that i like is ahnenerbe's one. | |
0. downloads | |
- download "Ahnenerbe WideGui 1920 x 1080 Final" from | |
http://www.subsim.com/radioroom/showthread.php?t=215433 | |
- download GWX from |
import com.helger.schematron.ISchematronResource; | |
import com.helger.schematron.svrl.SVRLFailedAssertAndReport; | |
import com.helger.schematron.xslt.SchematronResourceSCH; | |
import javax.xml.transform.stream.StreamSource; | |
import java.io.File; | |
import java.util.List; | |
public class SchematronValidator { |
<xs:schema xmlns="http://csrc.nist.gov/ns/oscal/1.0" | |
xmlns:m="http://csrc.nist.gov/ns/oscal/metaschema/1.0" | |
xmlns:xs="http://www.w3.org/2001/XMLSchema" | |
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | |
elementFormDefault="qualified" | |
targetNamespace="http://csrc.nist.gov/ns/oscal/1.0" | |
version="1.1.0"> | |
<xs:annotation> | |
<xs:appinfo> | |
<m:schema-name>OSCAL System Security Plan (SSP) Model</m:schema-name> |
# Python 3.6+ | |
# pip(3) install requests | |
import requests | |
# Standard headers | |
HEADERS_AUTH = {"Content-Type": "application/x-www-form-urlencoded"} | |
HEADERS = {"Content-Type": "application/json"} | |
client_id = "SERVICE_ACCOUNT_CLIENT_ID" | |
client_secret = "SERVICE_ACCOUNT_CLIENT_SECRET" |
#!/usr/bin/env python3 | |
import sys | |
from lxml import etree | |
from pathlib import Path | |
import random | |
stig_folder = "./tests/test_data" | |