[Security] Secure and Sanitize Campaign API

Abierto
#975 3 comentarios 0 reacciones 1 asignado Ver en GitHub

@agaragon ya está trabajando en esto.

Desde el 10/6/2025.

Evaluación

Este issue todavía no se ha evaluado.

Descripción

Intro

In DevSecOps, "less privilege" refers to the principle of least privilege (PoLP), which means granting users, applications, or services the minimal level of access required to perform their tasks, and nothing more. When working with an API, this principle ensures that:

API users (such as applications or services) only have the minimum permissions they need to interact with the API. Each API key or token is assigned only the specific roles, access levels, or scopes necessary to perform a given function.Limiting exposure of sensitive data or operations by making sure an API consumer can only access certain endpoints or perform certain actions (e.g., read-only vs. read-write access).

Example in DevSecOps:

If you have an API that manages user data, and an application only needs to fetch user information, the API key associated with this app should only have read-only access to user data, not permissions to modify or delete it.
By enforcing least privilege, you minimize the risk of accidental or malicious damage in case the API key is compromised. Applying this principle helps to reduce security risks, ensuring that even if an account or service is compromised, the damage potential is limited.

Task

In file: https://github.com/OpenSourceFellows/amplify/blob/main/server/routes/api/campaigns.js

Copilot Prompts in quotes

  • " Limit Data Exposure" in line 17 - 26
  • Highlight file "refactor to give least privilege"
Lenguaje dominante
JavaScript
Estrellas
123
Forks
101
Métricas de merge de PR
Sin PR fusionados en 30 d

Preparar el entorno

Abrir en Codespaces

Inicia el contenedor de desarrollo del proyecto en tu navegador, con tu propia cuenta de GitHub.

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de OpenSourceFellows/amplify

Todos los issues de OpenSourceFellows/amplify

Issues similares

Más issues de JavaScript

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.