Skip to content

Commit

Permalink
Eliminate possibility of running arbitrary user-specified science images
Browse files Browse the repository at this point in the history
  • Loading branch information
ponyisi committed Feb 26, 2025
1 parent 998d426 commit e7cd927
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions servicex_app/servicex_app/resources/transformation/submit.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,6 @@ def make_api(cls, rabbitmq_adaptor, object_store,
help='Static list of Root Files. Provide this or Dataset Identifier.'
)
cls.parser.add_argument('selection', help='Query string')
cls.parser.add_argument('image')
cls.parser.add_argument('codegen')
cls.parser.add_argument('tree-name')
cls.parser.add_argument('workers', type=int, default=1)
Expand Down Expand Up @@ -144,7 +143,6 @@ def post(self):
config = current_app.config
user = self.get_requesting_user()

image = args.get("image")
did = args.get("did")
file_list = args.get("file-list")
user_codegen_name = args.get("codegen")
Expand Down Expand Up @@ -182,7 +180,6 @@ def post(self):
submitted_by=user.id if user is not None else None,
selection=args['selection'],
tree_name=args['tree-name'],
image=image,
result_destination=args['result-destination'],
result_format=args['result-format'],
workers=args['workers'],
Expand All @@ -201,9 +198,7 @@ def post(self):
self.code_gen_service.generate_code_for_selection(request_rec, namespace,
user_codegen_name)

# If the user didn't specify an image, use the one from the codegen
if not request_rec.image:
request_rec.image = codegen_transformer_image
request_rec.image = codegen_transformer_image

# Check to make sure the transformer docker image actually exists (if enabled)
if config['TRANSFORMER_VALIDATE_DOCKER_IMAGE']:
Expand Down

0 comments on commit e7cd927

Please sign in to comment.