Skip to content
Back to skills

GEO INFER SEC

ASecurity

Security and threat detection for geospatial systems. Use when implementing spatial access control, authentication and TOTP-based MFA, geospatial data anonymization, security auditing, or encrypting spatial data.

  • 17 stars
  • 0 votes
  • 0 copies
  • 0 views
  • Added September 1, 2026
ai-agentspythonbashflaskgitapisecurity

Works with

  • cli
  • api

Security analysis

A100/100

Pro scans all 20 files and shows the line behind each finding

Scanned September 22, 2026

npx -y skills add ActiveInferenceInstitute/GEO-INFER --skill GEO-INFER-SEC --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of GEO INFER SEC?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for GEO INFER SEC
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/activeinferenceinstitute-geo-infer-sec/badge)](https://www.skillsdirectory.com/skills/activeinferenceinstitute-geo-infer-sec)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: geo-infer-sec
description: Security and threat detection for geospatial systems. Use when implementing spatial access control, authentication and TOTP-based MFA, geospatial data anonymization, security auditing, or encrypting spatial data.
prerequisites:
  required: []
  recommended: []
difficulty: intermediate
estimated_time: 45min
examples_dir: ../GEO-INFER-EXAMPLES/examples/
---

# GEO-INFER-SEC

## Instructions

### Core Capabilities

- **Access control**: Role-based and spatial-boundary-based authorization
  (RBAC + SBAC) via `GeospatialAccessManager` (JWT tokens, point-in-permission
  checks, GeoDataFrame filtering).
- **Authentication**: JWT token lifecycle and RFC 6238 TOTP multi-factor
  authentication via `AuthenticationManager` (`enable_mfa` with a base32
  secret; authentication is denied when MFA is enabled and no valid code is
  supplied).
- **Threat detection**: `DigitalSecurityManager` (digital), `CognitiveSecurityManager`
  (behavioral), `PhysicalSecurityManager`, and `IntegratedSecurityManager`
  (cross-domain correlation). Threat indicators are SIMULATION-ONLY, loaded
  from a configurable YAML file — see `DigitalSecurityManager` docstring.
- **Audit logging**: Security event tracking with spatial context via
  `AuditLogger` (`log_authentication`, `log_authorization`, `log_data_access`,
  `generate_compliance_report`).
- **Data protection**: Spatial data anonymization and k-anonymity via
  `GeospatialAnonymizer` (`location_perturbation`, `spatial_k_anonymity`,
  `geographic_masking`); AES/Fernet encryption of text, JSON, coordinates, and
  GeoDataFrames via `GeospatialEncryption`.
- **Integrity**: Data integrity verification, tampering detection.

### Key Imports

```python
from geo_infer_sec.core.access_control import (
    GeospatialAccessManager,
    Role,
    SpatialPermission,
)
from geo_infer_sec.core.anonymization import GeospatialAnonymizer
from geo_infer_sec.core.authentication import AuthenticationManager
from geo_infer_sec.core.encryption import GeospatialEncryption
from geo_infer_sec.core.audit import AuditLogger
from geo_infer_sec.core.integrated_security import IntegratedSecurityManager
```

## Examples

### Spatially-scoped access control

```python
mgr = GeospatialAccessManager(secret_key="demo-secret")
mgr.add_role(
    Role(
        name="analyst",
        permissions=[SpatialPermission(name="view", attributes=["value"])],
    )
)
mgr.assign_role_to_user("alice", "analyst")

payload = mgr.validate_token(mgr.generate_token("alice"))
print(payload["user_id"])                       # alice
print(mgr.can_access_location("alice", 40.75, -73.98))  # True / False
```

### Anonymizing point data (EPSG:4326)

```python
anon = GeospatialAnonymizer(seed=42)
perturbed = anon.location_perturbation(gdf, epsilon=100.0)  # meters, seeded
grouped = anon.spatial_k_anonymity(gdf, k=5, h3_resolution=8)
```
```python
import base64

from geo_infer_sec.core.authentication import AuthenticationManager, generate_totp

auth = AuthenticationManager(secret_key="signing-secret")
auth.register_user("alice", "correct-horse-battery")
secret = [REDACTED](b"0123456789abcdef").decode()
auth.enable_mfa("alice", secret)

auth.authenticate("alice", "correct-horse-battery")                 # denied: no code
code = generate_totp(secret)                                # RFC 6238 code
auth.authenticate("alice", "correct-horse-battery", mfa_code=code)  # TokenInfo
```

### CLI

```bash
geo-infer-sec --help   # anonymize / encrypt / decrypt / check-compliance /
                       # audit / risk-assessment / generate-token
```

## Guidelines

- `location_perturbation` assumes EPSG:4326 input and converts meters to
  degrees with a flat 111,000 m/deg factor; it raises on other CRS. Accuracy
  degrades away from the equator.
- Digital/cognitive/physical threat intelligence and background monitoring
  loops are simulation-only defaults; wire real feeds via the
  `threat_indicators_file` config before treating outputs as actionable.

### Integrations

- Integrates with API for endpoint security (`geo_infer_sec.api.security_api`,
  Flask blueprint; requires `init_security_api(app, secret_key)` before use).
- Test: `uv run python GEO-INFER-TEST/run_unified_tests.py --module SEC`

Files in this skill

  • AGENTS.md1.3 KB
  • README.md1.1 KB
  • SKILL.md2 KB
  • docs/AGENTS.md1.1 KB
  • docs/README.md903 B
  • docs/api_schema.yaml32.2 KB
  • examples/AGENTS.md1.2 KB
  • examples/README.md1.6 KB
  • examples/anonymization_example.py8.9 KB
  • examples/comprehensive_security_example.py19.4 KB
  • examples/secure_geospatial_data.py8.7 KB
  • pyproject.toml3.3 KB
  • requirements.txt229 B
  • setup.py1 KB
  • src/AGENTS.md1.1 KB
  • src/README.md900 B
  • src/geo_infer_sec/AGENTS.md1.2 KB
  • src/geo_infer_sec/README.md1.4 KB
  • src/geo_infer_sec/__init__.py3.7 KB
  • src/geo_infer_sec/api/AGENTS.md1.2 KB

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.