Repository navigation
DevSecOps and Workflows
DRomothewriter edited this page Nov 26, 2026
·
1 revision
Pipeline completo de CI/CD, análisis de seguridad estático/dinámico, integridad de recursos (SRI), supply chain con Cosign y despliegue sin llaves estáticas a S3 + CloudFront.
flowchart LR
FEAT["PR (feature/*, fix/*, chore/*)"] --> CIDEV["ci-dev.yml (ESLint Security, Build, TruffleHog, npm audit, Snyk SCA)"]
CIDEV --> DEV["Branch dev (protect-dev)"]
DEV -->|"PR dev -> main"| SECMAIN["security-main.yml (Karma lcov, SonarCloud, CodeQL, Snyk Code, Syft/Grype, OWASP ZAP)"]
SECMAIN --> MAIN["Branch main (protect-main)"]
MAIN -->|"GitHub Release vX.Y.Z"| REL["release.yml (Build SRI, Tarball reproducible, SBOM, Grype, Cosign, SLSA)"]
REL -->|"Manual Approval (environment: production)"| DEPLOY["AWS OIDC -> S3 Sync (--delete) + CloudFront Invalidation (/*)"]
| Workflow | Disparador | Gates y Herramientas | ¿Bloquea merge/deploy? |
|---|---|---|---|
ci-dev.yml |
pull_request → dev
|
Bloquea main → dev, npm run lint:security, npm run build, TruffleHog (--only-verified), Dependency Review (high), npm audit --omit=dev --audit-level=high, Snyk SCA (high, SARIF) |
Sí — los 3 checks son requeridos por protect-dev
|
security-main.yml |
pull_request → main, push → main, workflow_dispatch
|
Exige head_ref == dev, Node workflow tests (node --test tests/*.test.js) + Karma/Jasmine (ChromeHeadless + lcov), SonarCloud (qualitygate.wait=true), CodeQL (security-extended), Snyk Code (high), Syft SBOM + Grype (high, only-fixed), OWASP ZAP Baseline (-j Ajax Spider sobre 127.0.0.1:4200 + .zap/rules.tsv) |
Sí — los 7 checks + 1 aprobación + Code Owner (@DRomothewriter) son requeridos por protect-main
|
release.yml |
release: [published], workflow_dispatch
|
Valida SemVer vX.Y.Z + ancestro de origin/main, build producción con SRI, tarball reproducible (orbit-frontend-<tag>.tar.gz), Syft SBOM, Grype, firma/verificación Cosign Keyless, SLSA Provenance + SBOM Attestation, deploy OIDC a S3 + CloudFront
|
Sí — aborta en Grype o falla de verificación SHA256/Cosign; exige aprobación manual en production
|
Note
CodeRabbit (.coderabbit.yaml): Revisa PRs a dev y main en español (assertive, request_changes_workflow: true) verificando XSS, teardown de SocketService (socket.off + clearTimeout), rel="noopener noreferrer" y permisos de workflows.
-
Subresource Integrity (SRI):
angular.jsonhabilita"subresourceIntegrity": truey"outputHashing": "all"en builds de producción. -
ESLint Security (
eslint.config.mjs): Bloqueaeval,new Function,javascript:URLs,innerHTML,outerHTML,bypassSecurityTrustHtml,bypassSecurityTrustScriptydocument.write. -
Rulesets (
.github/rulesets/):protect-dev,protect-mainyprotect-release-tagsse aplican víascripts/apply-github-policies.sh. -
Dependabot (
.github/dependabot.yml): PRs semanales (lunes08:00 America/Mexico_City) haciadevparanpm(agrupado) ygithub-actions.
| Tipo | Nombre | Uso |
|---|---|---|
| Secret | AWS_ROLE_ARN |
Rol IAM asumido vía OIDC (release.yml) |
| Secret | SONAR_TOKEN |
Escaneo SonarCloud (security-main.yml) |
| Secret | SNYK_TOKEN |
Snyk SCA y Snyk Code |
| Variable / Secret | S3_FRONTEND_BUCKET_NAME |
Bucket S3 privado de destino (aws s3 sync --delete) |
| Variable / Secret | CLOUDFRONT_DISTRIBUTION_ID |
Distribución CloudFront para invalidación /*
|
| Variable | AWS_REGION |
Región AWS (default us-east-2) |
| Variable | SONAR_ORGANIZATION |
Organización SonarCloud (default dromothewriter) |
| Variable | SONAR_PROJECT_KEY |
Proyecto SonarCloud (default DRomothewriter_Orbit-Frontend) |
-
build-sign-attestcompila la SPA en modoproduction(con SRI), empaqueta un tarball reproducible, genera SBOMs, corre Grype y firma con Cosign Keyless adjuntando los artefactos al GitHub Release. -
deploy-productionespera aprobación manual enenvironment: production. - Antes de subir archivos, re-valida
sha256sum -c SHA256SUMS.txtycosign verify-blob, autentica a AWS por OIDC, sincronizas3://$S3_BUCKET/con--deletee invalida/*en CloudFront.
Inicio
Diseño y Contratos
DevSecOps y Operación
Ecosistema Orbit