tgwrap 0.9.1__py3-none-any.whl → 0.9.2__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.
tgwrap/main.py CHANGED
@@ -781,6 +781,12 @@ class TgWrap():
781
781
  Posts the payload to the given (Azure) data collection endpoint
782
782
  """
783
783
 
784
+ def mask_basic_auth(url):
785
+ # Regular expression to match basic authentication credentials in URL
786
+ auth_pattern = re.compile(r"(https?://)([^:@]+):([^:@]+)@(.+)")
787
+ # Return the url without the basic auth part
788
+ return auth_pattern.sub(r"\1\4", url)
789
+
784
790
  #
785
791
  # Everything we do here, can be done using native python. And probably this is preferable as well.
786
792
  # But I have decided to follow (at least for now) the overall approach of the app and that is
@@ -854,6 +860,9 @@ class TgWrap():
854
860
  if not repo:
855
861
  raise Exception(f'Could not get git repo info: {repo}')
856
862
 
863
+ # Remove the basic auth info if it is part of the url
864
+ repo = mask_basic_auth(repo)
865
+
857
866
  # Get the current path in the repo
858
867
  rc = subprocess.run(
859
868
  shlex.split('git rev-parse --show-prefix'),
@@ -908,6 +917,7 @@ class TgWrap():
908
917
  )
909
918
 
910
919
  resp.raise_for_status()
920
+ self.printer.success('Analyze results logged to DCE')
911
921
 
912
922
  except requests.exceptions.RequestException as e:
913
923
  # we warn but continue
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: tgwrap
3
- Version: 0.9.1
3
+ Version: 0.9.2
4
4
  Summary: A (terragrunt) wrapper around a (terraform) wrapper around ....
5
5
  Home-page: https://gitlab.com/lunadata/tgwrap
6
6
  License: MIT
@@ -2,10 +2,10 @@ tgwrap/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
2
2
  tgwrap/analyze.py,sha256=CsSaGv-be6ATy36z9X7x00gpKY59soJys2VbIzD-tmg,8726
3
3
  tgwrap/cli.py,sha256=jP7KuZzqwW2693fVsqEChzIto2T3YyPcSc9kW8ElDWI,29727
4
4
  tgwrap/deploy.py,sha256=-fSk-Ix_HqrXY7KQX_L27TnFzIuhBHYv4xYJW6zRDN4,10243
5
- tgwrap/main.py,sha256=FqpCZ3xGD33YD3IesFMq2QI2AvSv0_4txRpnoPX19Z4,80691
5
+ tgwrap/main.py,sha256=9v8c7o32xmmkgEOgrUCiDCcivol4lRzauS6L0pvXdLw,81157
6
6
  tgwrap/printer.py,sha256=dkcOCPIPB-IP6pn8QMpa06xlcqPFVaDvxnz-QEpDJV0,2663
7
- tgwrap-0.9.1.dist-info/LICENSE,sha256=VT-AVxIXt3EQTC-7Hy1uPGnrDNJLqfcgLgJD78fiyx4,1065
8
- tgwrap-0.9.1.dist-info/METADATA,sha256=lcUDX87EGrNYGks0mkRqlrESZiJbmvAAZza6bHkYK2A,13334
9
- tgwrap-0.9.1.dist-info/WHEEL,sha256=FMvqSimYX_P7y0a7UY-_Mc83r5zkBZsCYPm7Lr0Bsq4,88
10
- tgwrap-0.9.1.dist-info/entry_points.txt,sha256=H8X0PMPmd4aW7Y9iyChZ0Ug6RWGXqhRUvHH-6f6Mxz0,42
11
- tgwrap-0.9.1.dist-info/RECORD,,
7
+ tgwrap-0.9.2.dist-info/LICENSE,sha256=VT-AVxIXt3EQTC-7Hy1uPGnrDNJLqfcgLgJD78fiyx4,1065
8
+ tgwrap-0.9.2.dist-info/METADATA,sha256=n9o0ybKKHmlNA6XVq1HLnqPffzq5idUvIu5V45RoAAY,13334
9
+ tgwrap-0.9.2.dist-info/WHEEL,sha256=FMvqSimYX_P7y0a7UY-_Mc83r5zkBZsCYPm7Lr0Bsq4,88
10
+ tgwrap-0.9.2.dist-info/entry_points.txt,sha256=H8X0PMPmd4aW7Y9iyChZ0Ug6RWGXqhRUvHH-6f6Mxz0,42
11
+ tgwrap-0.9.2.dist-info/RECORD,,
File without changes