Skip to content

Commit

Permalink
Merge pull request akto-api-security#416 from akto-api-security/featu…
Browse files Browse the repository at this point in the history
…re/add_test_id_column

Add Test_ID column
  • Loading branch information
ankush-jain-akto committed Jul 7, 2023
2 parents 17aa4b4 + d039ed2 commit b8f2788
Showing 1 changed file with 17 additions and 4 deletions.
21 changes: 17 additions & 4 deletions .github/workflows/csvUpdate.yml
Original file line number Diff line number Diff line change
Expand Up @@ -79,17 +79,30 @@ jobs:
column.append(yaml_data['info']['impact'])
column.append(yaml_data['info']['category']['displayName'])
column.append(yaml_data['info']['severity'])
references = []

if 'references' in yaml_data['info']:
column.append(yaml_data['info']['references'])
references = yaml_data['info']['references']

else:
column.append("")

column.append(yaml_content)

url_path = ''
column.append(url_path)
column.append(yaml_data['id'])

rlink1 = "" if len(references) <= 0 else references[0]
rlink2 = "" if len(references) <= 1 else references[1]
rlink3 = "" if len(references) <= 2 else references[2]

column.append(rlink1)
column.append(rlink2)
column.append(rlink3)

csv_writer.writerow(column)


Expand All @@ -112,7 +125,7 @@ jobs:
if yaml_files:
with open(csv_file_path, 'w', newline='') as csv_file:
writer = csv.writer(csv_file)
writer.writerow(['Name', 'Slug', 'Description', 'Details', 'Impact', 'OWASP Category', 'Severity', 'References', 'Content', 'URL Path'])
writer.writerow(['Name', 'Slug', 'Description', 'Details', 'Impact', 'OWASP Category', 'Severity', 'References', 'Content', 'URL Path', 'Test_ID', 'RLink1', 'RLink2', 'RLink3'])

for yaml_file in yaml_files:
yaml_url = yaml_file['html_url']
Expand Down Expand Up @@ -165,4 +178,4 @@ jobs:
SMTP_USERNAME: ${{ secrets.SMTP_USERNAME }}
SMTP_PASSWORD: ${{ secrets.SMTP_PASSWORD }}
GITHUB_ACCESS_TOKEN: ${{ secrets.MY_TOKEN }}


0 comments on commit b8f2788

Please sign in to comment.