fix(security): enforce audited account, network and resource boundaries

Implement B01-B06 with regression coverage and retained validation evidence. Preserve the production ingress preflight; F04 runtime verification remains open.
This commit is contained in:
cesnimda
2026-09-09 18:21:47 +02:00
parent 7d641edc7b
commit 0954876295
116 changed files with 10101 additions and 122 deletions
+21
View File
@@ -0,0 +1,21 @@
using System.Globalization;
using System.Text;
namespace JobTrackerApi.Services;
public static class CsvCellSafety
{
// Apply to text before CSV quoting, never to stored data or typed numbers/dates.
// Prefix before (not instead of) whitespace/controls; an existing apostrophe is safe.
public static string SpreadsheetText(string? value)
{
if (string.IsNullOrEmpty(value)) return value ?? "";
foreach (var rune in value.EnumerateRunes())
{
if (Rune.IsWhiteSpace(rune) || Rune.IsControl(rune) || Rune.GetUnicodeCategory(rune) == UnicodeCategory.Format)
continue;
return rune.Value is '=' or '+' or '-' or '@' ? "'" + value : value;
}
return value;
}
}