aws / aws/industry-toolkit

[Bug] Blank Org name allowed in service call

Open
#38 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
13
Forks
1
PR merge metrics
No merged PRs in 30d

Description

The service call allows me to provide a blank org name for target that results in a failure as the correct github URL is not used to push the generated service
curl -X POST https://987wmb4kg2.execute-api.us-east-1.amazonaws.com/prod//services \
-H "Content-Type: application/json" \
-d '{
"serviceName": "elasticpath-cart",
"serviceType": "spring",
"description": "demo",
"model": "https://raw.githubusercontent.com/aws-samples/industry-reference-models/refs/heads/main/domains/retail/models/cart/model/cart.openapi.yaml",
"config": {
"basePackage": "com.industrytoolkit.ep",
"modelPackage": "com.industrytoolkit.ep.model",
"apiPackage": "com.industrytoolkit.ep.api",
"invokerPackage": "com.industrytoolkit.ep.configuration",
"groupId": "com.industrytoolkit.ep",
"artifactId": "cart"
},
"target": {
"org": "",
"secretKey": "aws-industry-toolkit-github",
"email": "wilthank@amazon.com",
"name": "Robot"
}
}'
cloudwatch logs:
2024-10-17T18:49:11.957Z
fatal: repository ‘https://github.com//elasticpath-cart.git/’ not found
2024-10-17T18:49:11.957Z
2024-10-17T18:49:11.957Z
[Container] 2024/10/17 18:49:11.937542 Command did not exit successfully git push -u origin main exit status 128
2024-10-17T18:49:11.957Z
[Container] 2024/10/17 18:49:11.942840 Phase complete: POST_BUILD State: FAILED
2024-10-17T18:49:11.957Z

Contributor guide

Open the contributing guide

Research direction

Start by reproducing the POST request to the /services endpoint with an empty target.org and compare it with the CloudWatch failure showing the malformed GitHub repository URL. Trace the service-call validation and repository-push path; done means a blank organization is rejected before the push is attempted and the failure is reported clearly.

Written by the indexing model from the issue text.

Assessment

Tech stack
git, github, python
Domain
api, backend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.