Add #nullable disable to vault code (#6053)

This commit is contained in:
Justin Baur 2025-07-08 11:46:13 -04:00 committed by GitHub
parent fa0c9cb387
commit 50461518e7
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
53 changed files with 212 additions and 53 deletions

View File

@ -1,4 +1,7 @@
using System.Text.Json; // FIXME: Update this file to be null safe and then delete the line below
#nullable disable
using System.Text.Json;
using Azure.Messaging.EventGrid; using Azure.Messaging.EventGrid;
using Bit.Api.Auth.Models.Request.Accounts; using Bit.Api.Auth.Models.Request.Accounts;
using Bit.Api.Models.Response; using Bit.Api.Models.Response;

View File

@ -1,4 +1,7 @@
using Bit.Api.Models.Response; // FIXME: Update this file to be null safe and then delete the line below
#nullable disable
using Bit.Api.Models.Response;
using Bit.Api.Vault.Models.Request; using Bit.Api.Vault.Models.Request;
using Bit.Api.Vault.Models.Response; using Bit.Api.Vault.Models.Response;
using Bit.Core.Exceptions; using Bit.Core.Exceptions;

View File

@ -1,4 +1,7 @@
using Bit.Api.Models.Response; // FIXME: Update this file to be null safe and then delete the line below
#nullable disable
using Bit.Api.Models.Response;
using Bit.Api.Vault.Models.Request; using Bit.Api.Vault.Models.Request;
using Bit.Api.Vault.Models.Response; using Bit.Api.Vault.Models.Response;
using Bit.Core.Services; using Bit.Core.Services;

View File

@ -1,4 +1,7 @@
using Bit.Api.Vault.Models.Response; // FIXME: Update this file to be null safe and then delete the line below
#nullable disable
using Bit.Api.Vault.Models.Response;
using Bit.Core; using Bit.Core;
using Bit.Core.AdminConsole.Entities; using Bit.Core.AdminConsole.Entities;
using Bit.Core.AdminConsole.Enums.Provider; using Bit.Core.AdminConsole.Enums.Provider;

View File

@ -1,4 +1,7 @@
using Bit.Core.Utilities; // FIXME: Update this file to be null safe and then delete the line below
#nullable disable
using Bit.Core.Utilities;
using Bit.Core.Vault.Models.Data; using Bit.Core.Vault.Models.Data;
namespace Bit.Api.Vault.Models; namespace Bit.Api.Vault.Models;

View File

@ -1,4 +1,7 @@
using System.ComponentModel.DataAnnotations; // FIXME: Update this file to be null safe and then delete the line below
#nullable disable
using System.ComponentModel.DataAnnotations;
using Bit.Core.Utilities; using Bit.Core.Utilities;
using Bit.Core.Vault.Models.Data; using Bit.Core.Vault.Models.Data;

View File

@ -1,4 +1,7 @@
using System.ComponentModel.DataAnnotations; // FIXME: Update this file to be null safe and then delete the line below
#nullable disable
using System.ComponentModel.DataAnnotations;
using Bit.Core.Utilities; using Bit.Core.Utilities;
using Bit.Core.Vault.Models.Data; using Bit.Core.Vault.Models.Data;

View File

@ -1,4 +1,7 @@
using Bit.Core.Utilities; // FIXME: Update this file to be null safe and then delete the line below
#nullable disable
using Bit.Core.Utilities;
using Bit.Core.Vault.Enums; using Bit.Core.Vault.Enums;
using Bit.Core.Vault.Models.Data; using Bit.Core.Vault.Models.Data;

View File

@ -1,4 +1,7 @@
using System.ComponentModel.DataAnnotations; // FIXME: Update this file to be null safe and then delete the line below
#nullable disable
using System.ComponentModel.DataAnnotations;
using Bit.Core.Utilities; using Bit.Core.Utilities;
using Bit.Core.Vault.Models.Data; using Bit.Core.Vault.Models.Data;

View File

@ -1,4 +1,7 @@
using Bit.Core.Enums; // FIXME: Update this file to be null safe and then delete the line below
#nullable disable
using Bit.Core.Enums;
using Bit.Core.Utilities; using Bit.Core.Utilities;
using Bit.Core.Vault.Models.Data; using Bit.Core.Vault.Models.Data;

View File

@ -1,4 +1,7 @@
using System.ComponentModel.DataAnnotations; // FIXME: Update this file to be null safe and then delete the line below
#nullable disable
using System.ComponentModel.DataAnnotations;
using Bit.Core.Utilities; using Bit.Core.Utilities;
using Bit.Core.Vault.Models.Data; using Bit.Core.Vault.Models.Data;

View File

@ -1,4 +1,7 @@
using Bit.Core.Utilities; // FIXME: Update this file to be null safe and then delete the line below
#nullable disable
using Bit.Core.Utilities;
using Bit.Core.Vault.Models.Data; using Bit.Core.Vault.Models.Data;
namespace Bit.Api.Vault.Models; namespace Bit.Api.Vault.Models;

View File

@ -1,4 +1,7 @@
namespace Bit.Api.Vault.Models.Request; // FIXME: Update this file to be null safe and then delete the line below
#nullable disable
namespace Bit.Api.Vault.Models.Request;
public class AttachmentRequestModel public class AttachmentRequestModel
{ {

View File

@ -1,4 +1,7 @@
using Bit.Core.Vault.Models.Api; // FIXME: Update this file to be null safe and then delete the line below
#nullable disable
using Bit.Core.Vault.Models.Api;
namespace Bit.Api.Vault.Models.Request; namespace Bit.Api.Vault.Models.Request;

View File

@ -1,4 +1,7 @@
namespace Bit.Api.Vault.Models.Request; // FIXME: Update this file to be null safe and then delete the line below
#nullable disable
namespace Bit.Api.Vault.Models.Request;
public class CipherBulkUpdateCollectionsRequestModel public class CipherBulkUpdateCollectionsRequestModel
{ {

View File

@ -1,4 +1,7 @@
using System.ComponentModel.DataAnnotations; // FIXME: Update this file to be null safe and then delete the line below
#nullable disable
using System.ComponentModel.DataAnnotations;
namespace Bit.Api.Vault.Models.Request; namespace Bit.Api.Vault.Models.Request;

View File

@ -1,4 +1,7 @@
using System.ComponentModel.DataAnnotations; // FIXME: Update this file to be null safe and then delete the line below
#nullable disable
using System.ComponentModel.DataAnnotations;
using System.Text.Json; using System.Text.Json;
using Bit.Core.Utilities; using Bit.Core.Utilities;
using Bit.Core.Vault.Entities; using Bit.Core.Vault.Entities;

View File

@ -1,4 +1,7 @@
using System.ComponentModel.DataAnnotations; // FIXME: Update this file to be null safe and then delete the line below
#nullable disable
using System.ComponentModel.DataAnnotations;
using Bit.Core.Utilities; using Bit.Core.Utilities;
using Bit.Core.Vault.Entities; using Bit.Core.Vault.Entities;

View File

@ -1,4 +1,7 @@
using Bit.Core.Models.Api; // FIXME: Update this file to be null safe and then delete the line below
#nullable disable
using Bit.Core.Models.Api;
using Bit.Core.Settings; using Bit.Core.Settings;
using Bit.Core.Utilities; using Bit.Core.Utilities;
using Bit.Core.Vault.Entities; using Bit.Core.Vault.Entities;

View File

@ -1,4 +1,7 @@
using Bit.Core.Enums; // FIXME: Update this file to be null safe and then delete the line below
#nullable disable
using Bit.Core.Enums;
using Bit.Core.Models.Api; using Bit.Core.Models.Api;
namespace Bit.Api.Vault.Models.Response; namespace Bit.Api.Vault.Models.Response;

View File

@ -1,4 +1,7 @@
using Bit.Core.Entities; // FIXME: Update this file to be null safe and then delete the line below
#nullable disable
using Bit.Core.Entities;
using Bit.Core.Models.Data.Organizations; using Bit.Core.Models.Data.Organizations;
using Bit.Core.Vault.Authorization.Permissions; using Bit.Core.Vault.Authorization.Permissions;
using Bit.Core.Vault.Models.Data; using Bit.Core.Vault.Models.Data;

View File

@ -1,4 +1,7 @@
using System.Text.Json; // FIXME: Update this file to be null safe and then delete the line below
#nullable disable
using System.Text.Json;
using Bit.Core.Entities; using Bit.Core.Entities;
using Bit.Core.Models.Api; using Bit.Core.Models.Api;
using Bit.Core.Models.Data.Organizations; using Bit.Core.Models.Data.Organizations;

View File

@ -1,4 +1,7 @@
using Bit.Core.Models.Api; // FIXME: Update this file to be null safe and then delete the line below
#nullable disable
using Bit.Core.Models.Api;
using Bit.Core.Vault.Entities; using Bit.Core.Vault.Entities;
namespace Bit.Api.Vault.Models.Response; namespace Bit.Api.Vault.Models.Response;

View File

@ -1,4 +1,7 @@
using Bit.Api.AdminConsole.Models.Response.Organizations; // FIXME: Update this file to be null safe and then delete the line below
#nullable disable
using Bit.Api.AdminConsole.Models.Response.Organizations;
using Bit.Api.Models.Response; using Bit.Api.Models.Response;
using Bit.Api.Tools.Models.Response; using Bit.Api.Tools.Models.Response;
using Bit.Core.AdminConsole.Entities; using Bit.Core.AdminConsole.Entities;

View File

@ -1,4 +1,7 @@
using Bit.Core.Enums; // FIXME: Update this file to be null safe and then delete the line below
#nullable disable
using Bit.Core.Enums;
using Bit.Core.NotificationCenter.Commands.Interfaces; using Bit.Core.NotificationCenter.Commands.Interfaces;
using Bit.Core.NotificationCenter.Entities; using Bit.Core.NotificationCenter.Entities;
using Bit.Core.NotificationCenter.Enums; using Bit.Core.NotificationCenter.Enums;

View File

@ -1,4 +1,7 @@
using System.Text.Json; // FIXME: Update this file to be null safe and then delete the line below
#nullable disable
using System.Text.Json;
using Bit.Core.Entities; using Bit.Core.Entities;
using Bit.Core.Utilities; using Bit.Core.Utilities;
using Bit.Core.Vault.Models.Data; using Bit.Core.Vault.Models.Data;

View File

@ -1,4 +1,7 @@
using Bit.Core.Vault.Entities; // FIXME: Update this file to be null safe and then delete the line below
#nullable disable
using Bit.Core.Vault.Entities;
namespace Bit.Core.Vault.Models.Data; namespace Bit.Core.Vault.Models.Data;

View File

@ -1,4 +1,7 @@
using System.Text.Json.Serialization; // FIXME: Update this file to be null safe and then delete the line below
#nullable disable
using System.Text.Json.Serialization;
namespace Bit.Core.Vault.Models.Data; namespace Bit.Core.Vault.Models.Data;

View File

@ -1,4 +1,7 @@
namespace Bit.Core.Vault.Models.Data; // FIXME: Update this file to be null safe and then delete the line below
#nullable disable
namespace Bit.Core.Vault.Models.Data;
public class CipherCardData : CipherData public class CipherCardData : CipherData
{ {

View File

@ -1,4 +1,7 @@
namespace Bit.Core.Vault.Models.Data; // FIXME: Update this file to be null safe and then delete the line below
#nullable disable
namespace Bit.Core.Vault.Models.Data;
public abstract class CipherData public abstract class CipherData
{ {

View File

@ -1,4 +1,7 @@
using Bit.Core.Vault.Enums; // FIXME: Update this file to be null safe and then delete the line below
#nullable disable
using Bit.Core.Vault.Enums;
namespace Bit.Core.Vault.Models.Data; namespace Bit.Core.Vault.Models.Data;

View File

@ -1,4 +1,7 @@
namespace Bit.Core.Vault.Models.Data; // FIXME: Update this file to be null safe and then delete the line below
#nullable disable
namespace Bit.Core.Vault.Models.Data;
public class CipherIdentityData : CipherData public class CipherIdentityData : CipherData
{ {

View File

@ -1,4 +1,7 @@
using Bit.Core.Enums; // FIXME: Update this file to be null safe and then delete the line below
#nullable disable
using Bit.Core.Enums;
namespace Bit.Core.Vault.Models.Data; namespace Bit.Core.Vault.Models.Data;

View File

@ -1,4 +1,7 @@
namespace Bit.Core.Vault.Models.Data; // FIXME: Update this file to be null safe and then delete the line below
#nullable disable
namespace Bit.Core.Vault.Models.Data;
public class CipherLoginFido2CredentialData public class CipherLoginFido2CredentialData
{ {

View File

@ -1,4 +1,7 @@
namespace Bit.Core.Vault.Models.Data; // FIXME: Update this file to be null safe and then delete the line below
#nullable disable
namespace Bit.Core.Vault.Models.Data;
public class CipherPasswordHistoryData public class CipherPasswordHistoryData
{ {

View File

@ -1,4 +1,7 @@
namespace Bit.Core.Vault.Models.Data; // FIXME: Update this file to be null safe and then delete the line below
#nullable disable
namespace Bit.Core.Vault.Models.Data;
public class CipherSSHKeyData : CipherData public class CipherSSHKeyData : CipherData
{ {

View File

@ -1,4 +1,7 @@
namespace Bit.Core.Vault.Models.Data; // FIXME: Update this file to be null safe and then delete the line below
#nullable disable
namespace Bit.Core.Vault.Models.Data;
/// <summary> /// <summary>
/// Minimal data model that represents a User and the associated cipher for a security task. /// Minimal data model that represents a User and the associated cipher for a security task.

View File

@ -1,4 +1,7 @@
namespace Bit.Core.Vault.Models.Data; // FIXME: Update this file to be null safe and then delete the line below
#nullable disable
namespace Bit.Core.Vault.Models.Data;
/// <summary> /// <summary>
/// Data model that represents a User and the associated cipher for a security task. /// Data model that represents a User and the associated cipher for a security task.

View File

@ -1,4 +1,7 @@
namespace Bit.Core.Vault.Models.Data; // FIXME: Update this file to be null safe and then delete the line below
#nullable disable
namespace Bit.Core.Vault.Models.Data;
/// <summary> /// <summary>
/// Data model that represents a User and the amount of actionable security tasks. /// Data model that represents a User and the amount of actionable security tasks.

View File

@ -1,4 +1,7 @@
using Bit.Core.Vault.Entities; // FIXME: Update this file to be null safe and then delete the line below
#nullable disable
using Bit.Core.Vault.Entities;
using Bit.Core.Vault.Models.Data; using Bit.Core.Vault.Models.Data;
namespace Bit.Core.Vault.Services; namespace Bit.Core.Vault.Services;

View File

@ -1,4 +1,7 @@
using Azure.Storage.Blobs; // FIXME: Update this file to be null safe and then delete the line below
#nullable disable
using Azure.Storage.Blobs;
using Azure.Storage.Blobs.Models; using Azure.Storage.Blobs.Models;
using Azure.Storage.Sas; using Azure.Storage.Sas;
using Bit.Core.Enums; using Bit.Core.Enums;

View File

@ -1,4 +1,7 @@
using System.Text.Json; // FIXME: Update this file to be null safe and then delete the line below
#nullable disable
using System.Text.Json;
using Bit.Core.AdminConsole.Enums; using Bit.Core.AdminConsole.Enums;
using Bit.Core.AdminConsole.OrganizationFeatures.Policies; using Bit.Core.AdminConsole.OrganizationFeatures.Policies;
using Bit.Core.AdminConsole.OrganizationFeatures.Policies.PolicyRequirements; using Bit.Core.AdminConsole.OrganizationFeatures.Policies.PolicyRequirements;

View File

@ -1,4 +1,7 @@
using Bit.Core.Enums; // FIXME: Update this file to be null safe and then delete the line below
#nullable disable
using Bit.Core.Enums;
using Bit.Core.Services; using Bit.Core.Services;
using Bit.Core.Vault.Entities; using Bit.Core.Vault.Entities;
using Bit.Core.Vault.Models.Data; using Bit.Core.Vault.Models.Data;

View File

@ -1,4 +1,7 @@
using System.Data; // FIXME: Update this file to be null safe and then delete the line below
#nullable disable
using System.Data;
using Bit.Core.Vault.Entities; using Bit.Core.Vault.Entities;
using Dapper; using Dapper;

View File

@ -1,4 +1,7 @@
using System.Data; // FIXME: Update this file to be null safe and then delete the line below
#nullable disable
using System.Data;
using Bit.Core.Vault.Entities; using Bit.Core.Vault.Entities;
using Dapper; using Dapper;

View File

@ -1,4 +1,7 @@
using System.Data; // FIXME: Update this file to be null safe and then delete the line below
#nullable disable
using System.Data;
using System.Text.Json; using System.Text.Json;
using Bit.Core.Entities; using Bit.Core.Entities;
using Bit.Core.KeyManagement.UserKey; using Bit.Core.KeyManagement.UserKey;

View File

@ -1,4 +1,7 @@
using System.Data; // FIXME: Update this file to be null safe and then delete the line below
#nullable disable
using System.Data;
using Bit.Core.KeyManagement.UserKey; using Bit.Core.KeyManagement.UserKey;
using Bit.Core.Settings; using Bit.Core.Settings;
using Bit.Core.Vault.Entities; using Bit.Core.Vault.Entities;

View File

@ -1,4 +1,7 @@
using AutoMapper; // FIXME: Update this file to be null safe and then delete the line below
#nullable disable
using AutoMapper;
using Bit.Infrastructure.EntityFramework.AdminConsole.Models; using Bit.Infrastructure.EntityFramework.AdminConsole.Models;
using Bit.Infrastructure.EntityFramework.Models; using Bit.Infrastructure.EntityFramework.Models;

View File

@ -1,4 +1,7 @@
using AutoMapper; // FIXME: Update this file to be null safe and then delete the line below
#nullable disable
using AutoMapper;
using Bit.Infrastructure.EntityFramework.Models; using Bit.Infrastructure.EntityFramework.Models;
namespace Bit.Infrastructure.EntityFramework.Vault.Models; namespace Bit.Infrastructure.EntityFramework.Vault.Models;

View File

@ -1,4 +1,7 @@
using AutoMapper; // FIXME: Update this file to be null safe and then delete the line below
#nullable disable
using AutoMapper;
using Bit.Infrastructure.EntityFramework.AdminConsole.Models; using Bit.Infrastructure.EntityFramework.AdminConsole.Models;
namespace Bit.Infrastructure.EntityFramework.Vault.Models; namespace Bit.Infrastructure.EntityFramework.Vault.Models;

View File

@ -1,4 +1,7 @@
using System.Text.Json; // FIXME: Update this file to be null safe and then delete the line below
#nullable disable
using System.Text.Json;
using System.Text.Json.Nodes; using System.Text.Json.Nodes;
using AutoMapper; using AutoMapper;
using Bit.Core.KeyManagement.UserKey; using Bit.Core.KeyManagement.UserKey;

View File

@ -1,4 +1,7 @@
using AutoMapper; // FIXME: Update this file to be null safe and then delete the line below
#nullable disable
using AutoMapper;
using Bit.Core.KeyManagement.UserKey; using Bit.Core.KeyManagement.UserKey;
using Bit.Core.Vault.Repositories; using Bit.Core.Vault.Repositories;
using Bit.Infrastructure.EntityFramework.Repositories; using Bit.Infrastructure.EntityFramework.Repositories;

View File

@ -1,4 +1,7 @@
using Bit.Core.Vault.Models.Data; // FIXME: Update this file to be null safe and then delete the line below
#nullable disable
using Bit.Core.Vault.Models.Data;
using Bit.Infrastructure.EntityFramework.Repositories; using Bit.Infrastructure.EntityFramework.Repositories;
using Bit.Infrastructure.EntityFramework.Repositories.Queries; using Bit.Infrastructure.EntityFramework.Repositories.Queries;