{"id":46405193,"url":"https://github.com/henrist/cdk-cloudfront-auth","last_synced_at":"2026-03-05T12:02:18.520Z","repository":{"id":37354477,"uuid":"278769107","full_name":"henrist/cdk-cloudfront-auth","owner":"henrist","description":"CloudFront authorization with Cognito for CDK","archived":false,"fork":false,"pushed_at":"2026-02-26T18:50:53.000Z","size":6042,"stargazers_count":19,"open_issues_count":13,"forks_count":9,"subscribers_count":2,"default_branch":"master","last_synced_at":"2026-02-27T00:40:39.521Z","etag":null,"topics":["cdk","cloudfront","cognito"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/henrist.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2020-07-11T01:58:54.000Z","updated_at":"2026-02-15T19:35:49.000Z","dependencies_parsed_at":"2024-03-28T20:03:17.311Z","dependency_job_id":"7bdbc9c4-a2c5-4fc9-b5b1-9e5d2c76d782","html_url":"https://github.com/henrist/cdk-cloudfront-auth","commit_stats":{"total_commits":1313,"total_committers":4,"mean_commits":328.25,"dds":"0.49504950495049505","last_synced_commit":"2cb772e33288c77b873db5eb90d6043c46760f20"},"previous_names":[],"tags_count":176,"template":false,"template_full_name":null,"purl":"pkg:github/henrist/cdk-cloudfront-auth","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/henrist%2Fcdk-cloudfront-auth","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/henrist%2Fcdk-cloudfront-auth/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/henrist%2Fcdk-cloudfront-auth/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/henrist%2Fcdk-cloudfront-auth/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/henrist","download_url":"https://codeload.github.com/henrist/cdk-cloudfront-auth/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/henrist%2Fcdk-cloudfront-auth/sbom","scorecard":{"id":461505,"data":{"date":"2025-08-11","repo":{"name":"github.com/henrist/cdk-cloudfront-auth","commit":"f10013f8702d6cd6c53e1da4a8786526e7d6bcac"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":3.9,"checks":[{"name":"Dangerous-Workflow","score":10,"reason":"no dangerous workflow patterns detected","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Code-Review","score":0,"reason":"Found 0/30 approved changesets -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"Token-Permissions","score":0,"reason":"detected GitHub workflow tokens with excessive permissions","details":["Warn: no topLevel permission defined: .github/workflows/build.yaml:1","Info: no jobLevel write permissions found"],"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Maintained","score":8,"reason":"10 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 8","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"SAST","score":0,"reason":"no SAST tool detected","details":["Warn: no pull requests merged into dev branch"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Pinned-Dependencies","score":4,"reason":"dependency not pinned by hash detected -- score normalized to 4","details":["Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/build.yaml:8: update your workflow using https://app.stepsecurity.io/secureworkflow/henrist/cdk-cloudfront-auth/build.yaml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/build.yaml:9: update your workflow using https://app.stepsecurity.io/secureworkflow/henrist/cdk-cloudfront-auth/build.yaml/master?enable=pin","Warn: npmCommand not pinned by hash: .github/workflows/build.yaml:21","Info:   0 out of   2 GitHub-owned GitHubAction dependencies pinned","Info:   2 out of   3 npmCommand dependencies pinned"],"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: MIT License: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":-1,"reason":"internal error: error during branchesHandler.setup: internal error: githubv4.Query: Resource not accessible by integration","details":null,"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"Vulnerabilities","score":0,"reason":"16 existing vulnerabilities detected","details":["Warn: Project is vulnerable to: GHSA-v4mq-x674-ff73","Warn: Project is vulnerable to: GHSA-qq4x-c6h6-rfxh","Warn: Project is vulnerable to: GHSA-5pq3-h73f-66hr","Warn: Project is vulnerable to: GHSA-v6h2-p8h4-qcjw","Warn: Project is vulnerable to: GHSA-968p-4wvh-cqc8","Warn: Project is vulnerable to: GHSA-h5c3-5r3r-rr8q","Warn: Project is vulnerable to: GHSA-rmvr-2pp2-xj38","Warn: Project is vulnerable to: GHSA-xx4v-prfh-6cgc","Warn: Project is vulnerable to: GHSA-rx28-r23p-2qc3","Warn: Project is vulnerable to: GHSA-grv7-fg5c-xmjg","Warn: Project is vulnerable to: GHSA-3xgq-45jj-v275","Warn: Project is vulnerable to: GHSA-78xj-cgh5-2h22","Warn: Project is vulnerable to: GHSA-2p57-rm9w-gvfp","Warn: Project is vulnerable to: GHSA-952p-6rrq-rcjv","Warn: Project is vulnerable to: GHSA-c2qf-rxjj-qqgw","Warn: Project is vulnerable to: GHSA-f5x3-32g6-xq36"],"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}}]},"last_synced_at":"2025-08-19T11:14:50.366Z","repository_id":37354477,"created_at":"2025-08-19T11:14:50.366Z","updated_at":"2025-08-19T11:14:50.366Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30123730,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-05T11:11:57.947Z","status":"ssl_error","status_checked_at":"2026-03-05T11:11:29.001Z","response_time":93,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["cdk","cloudfront","cognito"],"created_at":"2026-03-05T12:02:17.927Z","updated_at":"2026-03-05T12:02:18.505Z","avatar_url":"https://github.com/henrist.png","language":"TypeScript","readme":"# CloudFront authorization with Cognito for CDK\n\nEasily add Cognito-based authorization to your CloudFront distribution,\nto place static files behind authorization.\n\nThis is based on https://github.com/aws-samples/cloudfront-authorization-at-edge.\n\n## Usage\n\n```bash\nnpm install @henrist/cdk-cloudfront-auth\n```\n\nDeploy the Lambda@Edge functions to us-east-1:\n\n```ts\n// In a stack deployed to us-east-1.\nconst authLambdas = new AuthLambdas(this, \"AuthLambdas\", {\n  regions: [\"eu-west-1\"], // Regions to make Lambda version params available.\n})\n```\n\nDeploy the Cognito and CloudFront setup in whatever region\nof your choice:\n\n```ts\nconst auth = new CloudFrontAuth(this, \"Auth\", {\n  cognitoAuthDomain: `${domain.domainName}.auth.${region}.amazoncognito.com`,\n  authLambdas, // AuthLambdas from above\n  userPool, // Cognito User Pool\n})\nconst distribution = new cloudfront.Distribution(this, \"Distribution\", {\n  defaultBehavior: auth.createProtectedBehavior(origin),\n  additionalBehaviors: auth.createAuthPagesBehaviors(origin),\n})\nauth.updateClient(\"ClientUpdate\", {\n  signOutUrl: `https://${distribution.distributionDomainName}${auth.signOutRedirectTo}`,\n  callbackUrl: `https://${distribution.distributionDomainName}${auth.callbackPath}`,\n})\n```\n\nIf using `CloudFrontWebDistribution` instead of `Distribution`:\n\n```ts\nconst distribution = new cloudfront.CloudFrontWebDistribution(this, \"Distribution\", {\n  originConfigs: [\n    {\n      behaviors: [\n        ...auth.authPages,\n        {\n          isDefaultBehavior: true,\n          lambdaFunctionAssociations: auth.authFilters,\n        },\n      ],\n    },\n  ],\n})\n```\n\n## Customizing authorization\n\nThe `CloudFrontAuth` construct accepts a `requireGroupAnyOf` property\nthat causes access to be restricted to only users in specific groups.\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhenrist%2Fcdk-cloudfront-auth","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhenrist%2Fcdk-cloudfront-auth","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhenrist%2Fcdk-cloudfront-auth/lists"}