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 +10 -0
- {tgwrap-0.9.1.dist-info → tgwrap-0.9.2.dist-info}/METADATA +1 -1
- {tgwrap-0.9.1.dist-info → tgwrap-0.9.2.dist-info}/RECORD +6 -6
- {tgwrap-0.9.1.dist-info → tgwrap-0.9.2.dist-info}/LICENSE +0 -0
- {tgwrap-0.9.1.dist-info → tgwrap-0.9.2.dist-info}/WHEEL +0 -0
- {tgwrap-0.9.1.dist-info → tgwrap-0.9.2.dist-info}/entry_points.txt +0 -0
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
|
@@ -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=
|
5
|
+
tgwrap/main.py,sha256=9v8c7o32xmmkgEOgrUCiDCcivol4lRzauS6L0pvXdLw,81157
|
6
6
|
tgwrap/printer.py,sha256=dkcOCPIPB-IP6pn8QMpa06xlcqPFVaDvxnz-QEpDJV0,2663
|
7
|
-
tgwrap-0.9.
|
8
|
-
tgwrap-0.9.
|
9
|
-
tgwrap-0.9.
|
10
|
-
tgwrap-0.9.
|
11
|
-
tgwrap-0.9.
|
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
|
File without changes
|
File without changes
|