runbooks 0.2.2__py3-none-any.whl → 0.2.5__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
runbooks/__init__.py CHANGED
@@ -4,4 +4,4 @@ runbooks
4
4
  Provides utility functions for math operations, AWS S3 interactions, and data management.
5
5
  """
6
6
 
7
- # __version__ = "0.2.2"
7
+ # __version__ = "0.2.5"
@@ -49,7 +49,7 @@
49
49
  <div class="col-6">
50
50
  <table class="table">
51
51
  <tr>
52
- <td>Account</td><td>{{ account_id }}</td>
52
+ <td>AWS Account</td><td>{{ account_id }}</td>
53
53
  </tr>
54
54
  <tr>
55
55
  <td>Generated at</td><td>{{ generated_at }}</td>
@@ -49,7 +49,7 @@
49
49
  <div class="col-6">
50
50
  <table class="table">
51
51
  <tr>
52
- <td>Account</td><td>{{ account_id }}</td>
52
+ <td>AWS Account</td><td>{{ account_id }}</td>
53
53
  </tr>
54
54
  <tr>
55
55
  <td>Generated at</td><td>{{ generated_at }}</td>
@@ -49,7 +49,7 @@
49
49
  <div class="col-6">
50
50
  <table class="table">
51
51
  <tr>
52
- <td>Account</td><td>{{ account_id }}</td>
52
+ <td>AWS Account</td><td>{{ account_id }}</td>
53
53
  </tr>
54
54
  <tr>
55
55
  <td>Generated at</td><td>{{ generated_at }}</td>
@@ -49,7 +49,7 @@
49
49
  <div class="col-6">
50
50
  <table class="table">
51
51
  <tr>
52
- <td>Account</td><td>{{ account_id }}</td>
52
+ <td>AWS Account</td><td>{{ account_id }}</td>
53
53
  </tr>
54
54
  <tr>
55
55
  <td>Generated at</td><td>{{ generated_at }}</td>
@@ -45,6 +45,7 @@ def parse_arguments():
45
45
  default="EN",
46
46
  help="Language for the Security Baseline Report (default: 'EN').",
47
47
  )
48
+ parser.add_argument("--output", default=None, help="Custom output directory for HTML results (default: ./results).")
48
49
  return parser.parse_args()
49
50
 
50
51
 
@@ -61,9 +62,10 @@ def main():
61
62
  logger.info("Starting AWS Security Baseline Tester...")
62
63
  logger.info(f"Using AWS profile: {args.profile}")
63
64
  logger.info(f"Report language: {args.language}")
65
+ logger.info(f"Output directory: {args.output}")
64
66
 
65
67
  ## Instantiate and run the Security Baseline Tester
66
- tester = SecurityBaselineTester(args.profile, args.language)
68
+ tester = SecurityBaselineTester(args.profile, args.language, args.output)
67
69
  tester.run()
68
70
 
69
71
  logger.info("AWS Security Baseline testing completed successfully.")
@@ -17,9 +17,10 @@ from .utils import common, language, level_const
17
17
 
18
18
 
19
19
  class SecurityBaselineTester:
20
- def __init__(self, profile, lang_code):
20
+ def __init__(self, profile, lang_code, output_dir):
21
21
  self.profile = profile
22
22
  self.language = lang_code
23
+ self.output = output_dir
23
24
  self.session = self._create_session()
24
25
  self.config = self._load_config()
25
26
  ## Call module 'language' and pass the string 'lang_code'
@@ -142,8 +143,14 @@ class SecurityBaselineTester:
142
143
  # else:
143
144
  # logging.info(self.translator.translate("results_folder_already_exists"))
144
145
 
145
- script_dir = Path(__file__).resolve().parent
146
- results_dir = script_dir / "results"
146
+ ## ISSUE: creates results/ next to the module files in, e.g, .../site-packages/runbooks/security_baseline/results
147
+ # script_dir = Path(__file__).resolve().parent
148
+ # results_dir = script_dir / "results"
149
+ ## Use the current working directory instead of the script directory
150
+ if self.output:
151
+ results_dir = Path(self.output).resolve()
152
+ else:
153
+ results_dir = Path.cwd() / "results"
147
154
 
148
155
  if not results_dir.exists():
149
156
  results_dir.mkdir(parents=True, exist_ok=True)
@@ -1,8 +1,8 @@
1
1
  Metadata-Version: 2.2
2
2
  Name: runbooks
3
- Version: 0.2.2
3
+ Version: 0.2.5
4
4
  Summary: CloudOps Automation Toolkit for DevOps and SRE teams.
5
- Author-email: runbooks maintainers <nnthanh101@gmail.com>
5
+ Author-email: Runbooks Maintainers <nnthanh101@gmail.com>
6
6
  License: Apache License
7
7
  Version 2.0, January 2004
8
8
  http://www.apache.org/licenses/
@@ -205,6 +205,10 @@ License: Apache License
205
205
  See the License for the specific language governing permissions and
206
206
  limitations under the License.
207
207
 
208
+ Project-URL: Homepage, https://cloudops.oceansoft.io
209
+ Project-URL: Repository, https://github.com/1xOps/CloudOps-Runbooks
210
+ Project-URL: Documentation, https://cloudops.oceansoft.io/runbooks/
211
+ Project-URL: Issues, https://github.com/nnthanh101/template/issues
208
212
  Keywords: runbooks,automation,DevOps,SRE,CloudOps
209
213
  Classifier: Development Status :: 5 - Production/Stable
210
214
  Classifier: Environment :: Console
@@ -255,7 +259,7 @@ Requires-Dist: pandas>=2.2.3
255
259
  Requires-Dist: plotly>=5.24.1
256
260
  Requires-Dist: vizro>=0.1.30
257
261
  Requires-Dist: vizro-ai>=0.3.2
258
- Requires-Dist: runbooks>=0.2.2
262
+ Requires-Dist: runbooks>=0.2.5
259
263
 
260
264
  # 🔥 CloudOps Automation at Scale 🦅
261
265
 
@@ -1,4 +1,4 @@
1
- runbooks/__init__.py,sha256=qeIbPORHnybodq1itJ5LeDQ49K9KMNhyZb1SLIePLxg,133
1
+ runbooks/__init__.py,sha256=Qo6cNZ5m2FHnbsqEFrSgS4Ds24wsjy_eoMUKz5avb60,133
2
2
  runbooks/aws/__init__.py,sha256=iswGPspnFaHLE_Zzw2uRraYI2zvJ1Nma5PbdOiBUdEo,1646
3
3
  runbooks/aws/dynamodb_operations.py,sha256=c91YACBHnOELL8Ufj7tRQws9azGqnB6flQsacTi57xQ,6490
4
4
  runbooks/aws/ec2_copy_image_cross-region.py,sha256=2Afoo2ddzswgtdhdzsDq5aZiqXkQ0_kUyRdHbhkaLAA,6017
@@ -24,12 +24,12 @@ runbooks/security_baseline/config-origin.json,sha256=PGgnYqIezumoAO_q5Wav6HDmC7O
24
24
  runbooks/security_baseline/config.json,sha256=PGgnYqIezumoAO_q5Wav6HDmC7O-OLFucqwC_0dkCcQ,1008
25
25
  runbooks/security_baseline/permission.json,sha256=rpn6jdZja8SidfjHtQDjzNBx9qlg9Xl4ZZ3RxDXzKGc,1260
26
26
  runbooks/security_baseline/report_generator.py,sha256=rHh9d6OBg_Qcy59ZJSCfZu0ur-LeE_dSIc2LJQAtWMY,6333
27
- runbooks/security_baseline/report_template_en.html,sha256=wXommD4UxeorrsvPDMTclGMycCW0tT0sq3S2thztc8I,8039
28
- runbooks/security_baseline/report_template_jp.html,sha256=wXommD4UxeorrsvPDMTclGMycCW0tT0sq3S2thztc8I,8039
29
- runbooks/security_baseline/report_template_kr.html,sha256=3zAQOM5Wwy_J3dXt_KxfvLm-0uksWgenBwySUXvFhU4,10489
30
- runbooks/security_baseline/report_template_vn.html,sha256=wXommD4UxeorrsvPDMTclGMycCW0tT0sq3S2thztc8I,8039
31
- runbooks/security_baseline/run_script.py,sha256=lrvbcOtofspBnI17YYw2q_3CG4q3awoEnsaZ2HcGZ_E,2084
32
- runbooks/security_baseline/security_baseline_tester.py,sha256=mOVvWWXByaQklth0QeEHxGCMT7bVGrUIVRgmUhINeg0,7354
27
+ runbooks/security_baseline/report_template_en.html,sha256=nNIT2idPdtBf8y1oFiAu-fL_uej9A7tw15gU8PSd004,8043
28
+ runbooks/security_baseline/report_template_jp.html,sha256=nNIT2idPdtBf8y1oFiAu-fL_uej9A7tw15gU8PSd004,8043
29
+ runbooks/security_baseline/report_template_kr.html,sha256=p3cStZ3i8Bor7zL9h-6wsJtTccmR7LEOcaKcv7gmmp4,10493
30
+ runbooks/security_baseline/report_template_vn.html,sha256=nNIT2idPdtBf8y1oFiAu-fL_uej9A7tw15gU8PSd004,8043
31
+ runbooks/security_baseline/run_script.py,sha256=EVsLzmb8aLXJqXvNxSMKMdIFRJXXtPPK3iJk-PBcTgs,2274
32
+ runbooks/security_baseline/security_baseline_tester.py,sha256=p4RXkOdrMcGwC970PkdvcJggd0PPlQvGoYb98LycaR4,7743
33
33
  runbooks/security_baseline/checklist/__init__.py,sha256=gXjVSA36zv5jCkaw3XASG8DpLPo6Fu8yxquUdX8YSFY,455
34
34
  runbooks/security_baseline/checklist/account_level_bucket_public_access.py,sha256=_sILKNiBg-33wUUxoZhUq2O-x-xC2zZU9cQUehYMxTs,3386
35
35
  runbooks/security_baseline/checklist/alternate_contacts.py,sha256=MqHcKNwwmNKTna0bOdUPPNj2ytobpDMGPAUW2XhvRxI,3043
@@ -54,8 +54,8 @@ runbooks/security_baseline/utils/level_const.py,sha256=l8uYBmgEMjIQTGVVuXPAfDd_P
54
54
  runbooks/security_baseline/utils/permission_list.py,sha256=nq06vlILHp9rfnCpJauCmFCOEGdgFMF-XO3uBFrrd-o,767
55
55
  runbooks/utils/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
56
56
  runbooks/utils/logger.py,sha256=ifxqLjDlZoDaG8rtAGVKLZ5dAwcMn16rB4YgMfeUC3E,972
57
- runbooks-0.2.2.dist-info/METADATA,sha256=myHAk6MRwOOFjRu2vYWUxrx4SafUC8To5cHvqoEqCWw,24982
58
- runbooks-0.2.2.dist-info/WHEEL,sha256=In9FTNxeP60KnTkGw7wk6mJPYd_dQSjEZmXdBdMCI-8,91
59
- runbooks-0.2.2.dist-info/entry_points.txt,sha256=OJnk7J9_zVLbo3ZDr9DZ-RviRA8TsU9nMZJnNI91otQ,120
60
- runbooks-0.2.2.dist-info/top_level.txt,sha256=1EwNxU12QGOLtO0Naw75hXIdSIhgV_b-z_6vhlhVkhM,9
61
- runbooks-0.2.2.dist-info/RECORD,,
57
+ runbooks-0.2.5.dist-info/METADATA,sha256=yz6FrzGDwEHxznl4AN6tEMw2XHxpmcWyX8cX1kS5NFM,25238
58
+ runbooks-0.2.5.dist-info/WHEEL,sha256=In9FTNxeP60KnTkGw7wk6mJPYd_dQSjEZmXdBdMCI-8,91
59
+ runbooks-0.2.5.dist-info/entry_points.txt,sha256=OJnk7J9_zVLbo3ZDr9DZ-RviRA8TsU9nMZJnNI91otQ,120
60
+ runbooks-0.2.5.dist-info/top_level.txt,sha256=1EwNxU12QGOLtO0Naw75hXIdSIhgV_b-z_6vhlhVkhM,9
61
+ runbooks-0.2.5.dist-info/RECORD,,