Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
55 commits
Select commit Hold shift + click to select a range
356a952
Modernize Geocoding.Core: pattern matching, String.* convention, name…
niemyjski Mar 20, 2026
2cfda30
Modernize Geocoding.Google: code style, enum completeness, sensor rem…
niemyjski Mar 20, 2026
f6e5c79
Add Azure Maps provider and modernize Geocoding.Microsoft
niemyjski Mar 20, 2026
75a5526
Modernize Geocoding.Here: migrate to API-key auth, v7 endpoint, code …
niemyjski Mar 20, 2026
e755951
Modernize Geocoding.MapQuest: disable OSM, TolerantStringEnumConverte…
niemyjski Mar 20, 2026
70a59e4
Modernize Geocoding.Yahoo: code style, deprecation cleanup
niemyjski Mar 20, 2026
a6bf1ef
Modernize test suite: three-part naming, AAA pattern, credential gating
niemyjski Mar 20, 2026
554b391
Update README, samples, and config for provider modernization
niemyjski Mar 20, 2026
3298497
Enable nullable reference types globally
niemyjski Mar 21, 2026
ef0406d
Migrate Geocoding.Core to System.Text.Json and annotate nullable types
niemyjski Mar 21, 2026
0390ac4
Migrate Google provider to System.Text.Json with nullable annotations
niemyjski Mar 21, 2026
b1c424b
Modernize Microsoft provider: STJ migration, decouple Azure Maps, fix…
niemyjski Mar 21, 2026
cd62c74
Modernize HERE provider: STJ migration, exception filters, nullable a…
niemyjski Mar 21, 2026
f0935fa
Modernize MapQuest provider: STJ migration, constructor fix, nullable…
niemyjski Mar 21, 2026
3e20bcd
Mark Yahoo provider as obsolete with nullable annotations
niemyjski Mar 21, 2026
60059f0
Modernize test project: AAA comments, nullable fixes, env var config
niemyjski Mar 21, 2026
e058d8c
Apply review feedback: consistent exception filters, defensive null h…
niemyjski Mar 21, 2026
4ad9533
Handle disabled Google Geocoding API keys gracefully in tests
niemyjski Mar 21, 2026
10c6458
Simplify Google exception tests
niemyjski Mar 21, 2026
a2fd6ed
Stabilize Google postal code filter coverage
niemyjski Mar 21, 2026
a49f8fe
Align test settings with sample provider configuration
niemyjski Mar 21, 2026
e4a78a0
Restore strict shared assertions and stable Google filter coverage
niemyjski Mar 21, 2026
d3623a9
Restore explicit Yahoo test skipping for deprecated provider
niemyjski Mar 21, 2026
d357b74
Tighten branch test integrity after full audit
niemyjski Mar 22, 2026
5aa4c4d
Require U.S. country signal in Google bounds-bias test
niemyjski Mar 22, 2026
c0a0894
Keep provider compatibility tests in provider suites
niemyjski Mar 22, 2026
945481d
Align Yahoo test configuration with provider settings
niemyjski Mar 22, 2026
949c594
Fix provider review regressions in JSON and input handling
niemyjski Mar 22, 2026
2da13f5
Align project agents with Geocoding.net workflows
niemyjski Mar 22, 2026
0cadcb3
Harden Microsoft parser edge cases
niemyjski Mar 22, 2026
7ec05ce
Restore provider compatibility surfaces
niemyjski Mar 22, 2026
431a9f8
Remove HERE legacy credential flow
niemyjski Mar 22, 2026
49e6b0d
Tidy remaining sample and parser review feedback
niemyjski Mar 22, 2026
906687c
Preserve Microsoft enum compatibility
niemyjski Mar 22, 2026
64450ba
Polish Azure parser filtering
niemyjski Mar 22, 2026
3934bbf
Re-enable Yahoo tests behind credential gating
niemyjski Mar 22, 2026
45adbaa
Harden provider transport error handling
niemyjski Mar 22, 2026
39afda4
Align Google and Yahoo transport failures
niemyjski Mar 22, 2026
55506b2
Tighten transport regression coverage
niemyjski Mar 22, 2026
65e8e1e
Fix Location hash stability
niemyjski Mar 22, 2026
47c2c60
Clean up final analyzer findings
niemyjski Mar 22, 2026
0b917a5
Close remaining final-review gaps
niemyjski Mar 23, 2026
51b7fc7
Split shared helpers by concern
niemyjski Mar 23, 2026
4164eb0
Move shared helpers into Geocoding.Extensions
niemyjski Mar 23, 2026
6502975
Use the new helpers as real extension methods
niemyjski Mar 23, 2026
31e932a
Build a real docs site and align sample/test surfaces
niemyjski Mar 23, 2026
183ae8d
Stabilize provider parsing and request handling
niemyjski Mar 23, 2026
14e700f
Tighten test naming and remove request disposal ownership
niemyjski Mar 23, 2026
f211719
Apply suggestion from @niemyjski
niemyjski Mar 23, 2026
0f0c28c
Address remaining PR test feedback
niemyjski Mar 23, 2026
e1b816c
Harden MapQuest exception handling
niemyjski Mar 23, 2026
0823eb7
Switch Yahoo endpoints to HTTPS
niemyjski Mar 23, 2026
a26a761
Restore strict Google bias and postal assertions
niemyjski Mar 23, 2026
b95f45c
Update README.md
niemyjski Mar 23, 2026
bbeb8c6
Update docs/guide/sample-app.md
niemyjski Mar 23, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
65 changes: 65 additions & 0 deletions .agents/skills/geocoding-library/SKILL.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
---
name: geocoding-library
description: >
Use this skill when implementing, reviewing, or triaging changes in Geocoding.net. Covers
provider isolation, shared geocoding abstractions, provider-specific address and exception
types, xUnit test strategy, API-key-backed test constraints, backward compatibility, and the
sample web app's role in the repository.
---

# Geocoding.net Library Patterns

## When to Use

- Any change under `src/`, `test/`, `samples/`, `.claude/`, or repo-owned customization files
- Bug fixes that may repeat across multiple geocoding providers
- Code reviews or triage work that needs repo-specific architecture context

## Architecture Rules

- Keep shared abstractions in `src/Geocoding.Core`
- Keep provider-specific request/response logic inside that provider's project
- Do not leak provider-specific types into `Geocoding.Core`
- Prefer extending an existing provider pattern over inventing a new abstraction
- Keep public async APIs suffixed with `Async`
- Keep `CancellationToken` as the final public parameter and pass it through the call chain

## Provider Isolation

- Each provider owns its own address type, exceptions, DTOs, and request logic
- If a bug or improvement appears in one provider, compare sibling providers for the same pattern
- Shared helpers should only move into `Geocoding.Core` when they truly apply across providers

## Backward Compatibility

- Avoid breaking public interfaces, constructors, or model properties unless the task explicitly requires it
- Preserve existing provider behavior unless the task is a bug fix with a documented root cause
- Keep exception behavior intentional and provider-specific

## Testing Strategy

- Extend existing xUnit coverage before creating new test files when practical
- Prefer targeted test runs for narrow changes
- Run the full `Geocoding.Tests` project when shared abstractions, common test bases, or cross-provider behavior changes
- Remember that some provider tests require local API keys in `test/Geocoding.Tests/settings-override.json` or `GEOCODING_` environment variables; keep the tracked `settings.json` placeholders empty
- For bug fixes, add a regression test when the affected path is covered by automated tests

## Validation Commands

```bash
dotnet build Geocoding.slnx
dotnet test --project test/Geocoding.Tests/Geocoding.Tests.csproj
dotnet build samples/Example.Web/Example.Web.csproj
```

## Sample App Guidance

- `samples/Example.Web` demonstrates the library; it should not drive core design decisions
- Only build or run the sample when the task actually touches the sample or requires manual verification there

## Customization Files

- `.claude/agents` and repo-owned skills must stay Geocoding.net-specific
- Reference only skills that exist in `.agents/skills/`
- Reference only commands, paths, and tools that exist in this workspace
- Keep customization workflows aligned with AGENTS.md
46 changes: 26 additions & 20 deletions .agents/skills/security-principles/SKILL.md
Original file line number Diff line number Diff line change
@@ -1,28 +1,27 @@
---
name: security-principles
description: >
Use this skill when handling secrets, credentials, PII, input validation, or any
security-sensitive code. Covers secrets management, secure defaults, encryption, logging
safety, and common vulnerability prevention. Apply when adding authentication, configuring
environment variables, reviewing code for security issues, or working with sensitive data.
Use this skill when handling provider API keys, external geocoding responses, request
construction, logging safety, or other security-sensitive code in Geocoding.net. Apply when
reviewing secrets handling, input validation, secure transport, or safety risks around
external provider integrations and sample/test configuration.
---

# Security Principles

## Secrets Management

Secrets are injected via Kubernetes ConfigMaps and environment variables never commit secrets to the repository.
Provider credentials belong in local override files or environment variables and must never be committed to the repository.

- **Configuration files** — Use `appsettings.yml` for non-secret config
- **Environment variables** — Secrets injected at runtime via `EX_*` prefix
- **Kubernetes** — ConfigMaps mount configuration, Secrets mount credentials
- **Tracked placeholders** — `test/Geocoding.Tests/settings.json` is versioned and should contain placeholders only; do not put real keys there
- **Test credentials** — Keep provider API keys in `test/Geocoding.Tests/settings-override.json` or via `GEOCODING_` environment variables
- **Sample configuration** — Use placeholder values only in `samples/Example.Web/appsettings.json`
- **Environment variables** — Use environment variables for CI or local overrides when needed

```csharp
// AppOptions binds to configuration (including env vars)
public class AppOptions
public sealed class ProviderOptions
{
public string? StripeApiKey { get; set; }
public AuthOptions Auth { get; set; } = new();
public string? ApiKey { get; set; }
}
```

Expand All @@ -31,24 +30,25 @@ public class AppOptions
- Check bounds and formats before processing
- Use `ArgumentNullException.ThrowIfNull()` and similar guards
- Validate early, fail fast
- Validate coordinates, address fragments, and batch sizes before sending requests

## Sanitize External Data

- Never trust data from queues, caches, user input, or external sources
- Never trust data from geocoding providers, user input, or sample configuration
- Validate against expected schema
- Sanitize HTML/script content before storage or display
- Handle missing or malformed response fields without assuming provider correctness

## No Sensitive Data in Logs

- Never log passwords, tokens, API keys, or PII
- Never log passwords, tokens, API keys, or raw provider payloads
- Log identifiers and prefixes, not full values
- Use structured logging with safe placeholders

## Use Secure Defaults

- Default to encrypted connections (SSL/TLS enabled)
- Default to restrictive permissions
- Require explicit opt-out for security features
- Default to HTTPS provider endpoints
- Avoid disabling certificate or transport validation
- Require explicit opt-out for any non-secure development-only behavior

## Avoid Deprecated Cryptographic Algorithms

Expand All @@ -64,9 +64,15 @@ Use modern cryptographic algorithms:

## Input Bounds Checking

- Enforce minimum/maximum values on pagination parameters
- Enforce minimum/maximum values on pagination or batch parameters
- Limit batch sizes to prevent resource exhaustion
- Validate string lengths before storage
- Validate string lengths before request construction

## Safe Request Construction

- URL-encode user-supplied address fragments and query parameters
- Do not concatenate secrets or untrusted input into URLs without escaping
- Preserve provider-specific signing or authentication requirements without leaking secrets into logs

## OWASP Reference

Expand Down
Loading
Loading