italia/spid-cie-oidc-django

View on GitHub

Showing 35 of 138 total issues

Similar blocks of code found in 2 locations. Consider refactoring.
Open

examples/wallet_trust_anchor/wallet_trust_anchor/settings.py on lines 0..81

Similar blocks of code found in 2 locations. Consider refactoring.
Open

Severity: Major
Found in examples/wallet_trust_anchor/wallet_trust_anchor/settings.py and 1 other location - About 1 day to fix
examples/federation_authority/federation_authority/settings.py on lines 0..81

Similar blocks of code found in 2 locations. Consider refactoring.
Open

spid_cie_oidc/entity/migrations/0031_alter_federationentityconfiguration_entity_type.py on lines 0..27

Similar blocks of code found in 2 locations. Consider refactoring.
Open

spid_cie_oidc/onboarding/migrations/0010_alter_onboardingregistration_type.py on lines 0..24

Function update_trust_marks has a Cognitive Complexity of 22 (exceeds 5 allowed). Consider refactoring.
Open

def update_trust_marks(modeladmin, request, queryset): # pragma: no cover
"""
fetch trust marks from all the authorities
"""
trust_marks = {}
Severity: Minor
Found in spid_cie_oidc/entity/admin.py - About 3 hrs to fix

Similar blocks of code found in 3 locations. Consider refactoring.
Open

migrations.AlterField(
model_name="federationdescendant",
name="type",
field=models.CharField(
blank=True,
spid_cie_oidc/entity/migrations/0029_alter_federationentityconfiguration_entity_type_and_more.py on lines 12..23
spid_cie_oidc/onboarding/migrations/0009_alter_onboardingregistration_type.py on lines 11..23

Similar blocks of code found in 3 locations. Consider refactoring.
Open

migrations.AlterField(
model_name="federationentityconfiguration",
name="entity_type",
field=models.CharField(
blank=True,
spid_cie_oidc/authority/migrations/0011_federationdescendant_issue_x509_and_more.py on lines 20..31
spid_cie_oidc/onboarding/migrations/0009_alter_onboardingregistration_type.py on lines 11..23

Similar blocks of code found in 3 locations. Consider refactoring.
Open

operations = [
migrations.AlterField(
model_name="onboardingregistration",
name="type",
field=models.CharField(
spid_cie_oidc/authority/migrations/0011_federationdescendant_issue_x509_and_more.py on lines 20..31
spid_cie_oidc/entity/migrations/0029_alter_federationentityconfiguration_entity_type_and_more.py on lines 12..23

Identical blocks of code found in 2 locations. Consider refactoring.
Open

"revocation_motivation",
models.CharField(
blank=True,
choices=[
(0, "unspecified"),
spid_cie_oidc/entity/migrations/0021_federationhistoricalkey.py on lines 55..68

Identical blocks of code found in 2 locations. Consider refactoring.
Open

"revocation_motivation",
models.CharField(
blank=True,
choices=[
(0, "unspecified"),
spid_cie_oidc/entity/migrations/0021_federationhistoricalkey_squashed_0026_alter_federationhistoricalkey_jwk.py on lines 47..60

Similar blocks of code found in 2 locations. Consider refactoring.
Open

spid_cie_oidc/entity/migrations/0023_alter_federationhistoricalkey_jwk.py on lines 0..15

Similar blocks of code found in 2 locations. Consider refactoring.
Open

spid_cie_oidc/authority/migrations/0007_stafftoken_expire_at.py on lines 0..16

Similar blocks of code found in 4 locations. Consider refactoring.
Open

spid_cie_oidc/authority/migrations/0002_alter_federationentityprofile_trust_mark_template.py on lines 0..16
spid_cie_oidc/entity/migrations/0003_federationentityconfiguration_constraints.py on lines 0..16
spid_cie_oidc/entity/migrations/0028_federationentityconfiguration_issue_x509.py on lines 0..18

Similar blocks of code found in 4 locations. Consider refactoring.
Open

spid_cie_oidc/authority/migrations/0002_alter_federationentityprofile_trust_mark_template.py on lines 0..16
spid_cie_oidc/entity/migrations/0003_federationentityconfiguration_constraints.py on lines 0..16
spid_cie_oidc/entity/migrations/0026_alter_federationhistoricalkey_jwk.py on lines 0..15

Similar blocks of code found in 2 locations. Consider refactoring.
Open

spid_cie_oidc/entity/migrations/0025_alter_federationhistoricalkey_jwk.py on lines 0..15

Similar blocks of code found in 2 locations. Consider refactoring.
Open

spid_cie_oidc/entity/migrations/0032_alter_fetchedentitystatement_jwt.py on lines 0..18

Similar blocks of code found in 2 locations. Consider refactoring.
Open

spid_cie_oidc/provider/migrations/0008_alter_oidcsession_authz_request.py on lines 0..18

Similar blocks of code found in 2 locations. Consider refactoring.
Open

spid_cie_oidc/entity/migrations/0024_alter_federationhistoricalkey_kid.py on lines 0..15

Function validate_claims has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring.
Open

def validate_claims(cls, claims):
for k_claim, v_claim in claims.items():
cl = cls.get_claims()
claims_items = cl.get(k_claim, None)
if not claims_items:
Severity: Minor
Found in spid_cie_oidc/provider/schemas/authn_requests.py - About 1 hr to fix

Function resolve_entity_statement has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring.
Open

def resolve_entity_statement(request, format: str = "jose"):
"""
resolves the final metadata of its descendants
 
In this implementation we only returns a preexisting
Severity: Minor
Found in spid_cie_oidc/entity/views.py - About 1 hr to fix
Severity
Category
Status
Source
Language