File tree Expand file tree Collapse file tree 3 files changed +33
-1
lines changed
src/confcom/azext_confcom Expand file tree Collapse file tree 3 files changed +33
-1
lines changed Original file line number Diff line number Diff line change @@ -3516,3 +3516,9 @@ confcom fragment attach:
35163516 signed_fragment :
35173517 rule_exclusions :
35183518 - no_positional_parameters
3519+
3520+ confcom fragment references from_image :
3521+ parameters :
3522+ image :
3523+ rule_exclusions :
3524+ - no_positional_parameters
Original file line number Diff line number Diff line change 321321 - name: Attach the output of acifragmentgen to a registry
322322 text: az confcom acifragmentgen --chain my.cert.pem --key my_key.pem --svn "1" --namespace contoso --feed "test-feed" --input ./fragment_spec.json | az confcom fragment attach --manifest-tag myregistry.azurecr.io/image:latest
323323"""
324+
325+ helps [
326+ "confcom fragment references"
327+ ] = """
328+ type: group
329+ short-summary: Commands which generate Security Policy Fragment References.
330+ """
331+
332+
333+ helps [
334+ "confcom fragment references from_image"
335+ ] = """
336+ type: command
337+ short-summary: Create a Security Policy Fragment Reference based on an image reference.
338+
339+ parameters:
340+ - name: --minimum-svn
341+ type: str
342+ short-summary: 'The value of the minimum SVN field in the generated fragment reference, defaults to current fragment reference'
343+
344+
345+ examples:
346+ - name: Input an image reference and generate fragment reference
347+ text: az confcom fragment references from_image my.azurecr.io/myimage:tag
348+ """
Original file line number Diff line number Diff line change @@ -66,4 +66,5 @@ def get_image_config(image: str) -> dict:
6666
6767
6868def sanitize_image_reference (image_reference : str ) -> str :
69- return re .sub (f"[{ re .escape (r'<>:"/\\|?*@\0' )} ]" , "-" , image_reference )
69+ illegal = r'<>:"/\\|?*@\0'
70+ return re .sub (f"[{ re .escape (illegal )} ]" , "-" , image_reference )
You can’t perform that action at this time.
0 commit comments