Skip to content

Commit

Permalink
update STIG library location
Browse files Browse the repository at this point in the history
  • Loading branch information
adamstauffer committed Jul 22, 2019
1 parent 1dd76c0 commit 019b452
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions backend/src/rmfdb/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
@click.group()
@click.pass_context
def main(ctx):
"""Main entrypoint."""
ctx.obj = rmfdb.web.app.create_app()


Expand All @@ -32,6 +33,7 @@ def main(ctx):
@click.option('--force', flag_value=True)
@click.pass_obj
def download_stigs(app, local_file, force):
"""Download STIG Compilation Library."""
with app.app_context():
if local_file:
library_file = open(local_file, 'rb')
Expand All @@ -41,8 +43,7 @@ def download_stigs(app, local_file, force):
flask.current_app.logger.info(
'Checking DISA for new masterlist release')
stig_page = requests.get(
'https://iase.disa.mil/stigs/Lists/stigs-masterlist/'
'stig-srg-compilation-qtr.aspx')
'https://public.cyber.mil/stigs/compilations')
stig_page_html = html.fromstring(stig_page.content)
links = stig_page_html.xpath('//a/@href')
download_library_link = None
Expand Down Expand Up @@ -87,6 +88,7 @@ def download_stigs(app, local_file, force):
@main.command()
@click.pass_obj
def seed_control_data(app):
"""Add NIST 800-53 controls to the database."""
with app.app_context():
controls_json = open('{}/800-53r4.json'.format(FIXTURE_DIR))
controls = json.load(controls_json)
Expand Down Expand Up @@ -128,6 +130,7 @@ def seed_control_data(app):
@main.command()
@click.pass_obj
def generate_sitemap(app):
"""Generate a sitemap.xml file."""
with app.app_context():
template = """<?xml version="1.0" encoding="UTF-8"?>
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
Expand Down

0 comments on commit 019b452

Please sign in to comment.