Skip to content

Commit

Permalink
updated migrations nexB#1283
Browse files Browse the repository at this point in the history
Signed-off-by: 404-geek <[email protected]>
  • Loading branch information
404-geek committed Jul 27, 2024
1 parent 9d72734 commit 301122e
Show file tree
Hide file tree
Showing 3 changed files with 44 additions and 165 deletions.
151 changes: 0 additions & 151 deletions scanpipe/migrations/0064_packagescore_scorecardcheck.py

This file was deleted.

44 changes: 44 additions & 0 deletions scanpipe/migrations/0067_packagescore_scorecardcheck.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
# Generated by Django 5.0.7 on 2024-07-27 10:20

import django.db.models.deletion
import uuid
from django.db import migrations, models


class Migration(migrations.Migration):

dependencies = [
('scanpipe', '0066_alter_webhooksubscription_options_and_more'),
]

operations = [
migrations.CreateModel(
name='PackageScore',
fields=[
('scoring_tool', models.CharField(blank=True, choices=[('ossf-scorecard', 'Ossf'), ('others', 'Others')], help_text='Defines the source of a score or any other scoring metricsFor example: ossf-scorecard for scorecard data', max_length=100)),
('scoring_tool_version', models.CharField(blank=True, help_text='Defines the version of the scoring tool used for scanning thepackageFor Eg : 4.6 current version of OSSF - scorecard', max_length=50)),
('score', models.CharField(blank=True, help_text='Score of the package which is scanned', max_length=50)),
('scoring_tool_documentation_url', models.CharField(blank=True, help_text='Documentation URL of the scoring tool used', max_length=100)),
('score_date', models.DateTimeField(blank=True, editable=False, help_text='Date when the scoring was calculated on the package', null=True)),
('uuid', models.UUIDField(db_index=True, default=uuid.uuid4, editable=False, primary_key=True, serialize=False, verbose_name='UUID')),
('discovered_package', models.ForeignKey(blank=True, editable=False, help_text='The package for which the score is given', null=True, on_delete=django.db.models.deletion.CASCADE, related_name='discovered_packages_score', to='scanpipe.discoveredpackage')),
],
options={
'abstract': False,
},
),
migrations.CreateModel(
name='ScorecardCheck',
fields=[
('check_name', models.CharField(blank=True, help_text='Defines the name of check corresponding to the OSSF scoreFor example: Code-Review or CII-Best-PracticesThese are the some of the checks which are performed on a scanned package', max_length=100)),
('check_score', models.CharField(blank=True, help_text='Defines the score of the check for the package scannedFor Eg : 9 is a score given for Code-Review', max_length=50)),
('reason', models.CharField(blank=True, help_text='Gives a reason why a score was given for a specific checkFor eg, : Found 9/10 approved changesets -- score normalized to 9', max_length=300)),
('details', models.JSONField(blank=True, default=list, help_text='A list of details/errors regarding the score')),
('uuid', models.UUIDField(db_index=True, default=uuid.uuid4, editable=False, primary_key=True, serialize=False, verbose_name='UUID')),
('for_package_score', models.ForeignKey(blank=True, editable=False, help_text='The checks for which the score is given', null=True, on_delete=django.db.models.deletion.CASCADE, related_name='discovered_packages_score_checks', to='scanpipe.packagescore')),
],
options={
'abstract': False,
},
),
]
14 changes: 0 additions & 14 deletions scanpipe/migrations/0072_merge_20240725_1903.py

This file was deleted.

0 comments on commit 301122e

Please sign in to comment.