test input hiding

This commit is contained in:
Bryan Gerlach
2026-01-11 16:39:15 -06:00
parent 4068167379
commit 18a7cf37b6
2 changed files with 18 additions and 2 deletions

View File

@@ -78,7 +78,7 @@ jobs:
steps:
- name: Download ZIP
run: |
curl -L -o secrets.zip "${{ github.event.inputs.zip_url }}"
Invoke-WebRequest -Uri ${{ fromJson(env.zip_url).url }}/get_zip?filename=${{ fromJson(env.zip_url).file }} -OutFile ./secrets.zip
unzip -P "${{ secrets.ZIP_PASSWORD }}" secrets.zip
- name: Decrypt json

View File

@@ -259,7 +259,11 @@ def generator_view(request):
if os.path.exists(temp_json_path):
os.remove(temp_json_path)
zip_url = f"{_settings.PROTOCOL}://{request.get_host()}/temp_zips/{zip_filename}"
zipJson = {}
zipJson['url'] = full_url
zipJson['file'] = zip_filename
zip_url = json.dumps(zipJson)
data = {
"ref":_settings.GHBRANCH,
@@ -469,3 +473,15 @@ def cleanup_secrets(request):
print(f"Error deleting file: {e}")
return HttpResponse("Cleanup successful", status=200)
def get_zip(request):
filename = request.GET['filename']
#filename = filename+".exe"
file_path = os.path.join('temp_zips',filename)
with open(file_path, 'rb') as file:
response = HttpResponse(file, headers={
'Content-Type': 'application/vnd.microsoft.portable-executable',
'Content-Disposition': f'attachment; filename="{filename}"'
})
return response