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 @@ -3522,3 +3522,9 @@ confcom containers from_image:
35223522 image :
35233523 rule_exclusions :
35243524 - no_positional_parameters
3525+
3526+ confcom fragment references from_image :
3527+ parameters :
3528+ image :
3529+ rule_exclusions :
3530+ - no_positional_parameters
Original file line number Diff line number Diff line change 346346 - name: Input an image reference and generate container definitions
347347 text: az confcom containers from_image my.azurecr.io/myimage:tag
348348"""
349+
350+ helps [
351+ "confcom fragment references"
352+ ] = """
353+ type: group
354+ short-summary: Commands which generate Security Policy Fragment References.
355+ """
356+
357+
358+ helps [
359+ "confcom fragment references from_image"
360+ ] = """
361+ type: command
362+ short-summary: Create a Security Policy Fragment Reference based on an image reference.
363+
364+ parameters:
365+ - name: --minimum-svn
366+ type: str
367+ short-summary: 'The value of the minimum SVN field in the generated fragment reference, defaults to current fragment reference'
368+
369+
370+ examples:
371+ - name: Input an image reference and generate fragment reference
372+ text: az confcom fragment references from_image my.azurecr.io/myimage:tag
373+ """
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