{"id":13505560,"url":"https://github.com/kolomied/cdk-sqlserver-seeder","last_synced_at":"2026-01-30T01:16:20.795Z","repository":{"id":39574315,"uuid":"277320870","full_name":"kolomied/cdk-sqlserver-seeder","owner":"kolomied","description":"A simple CDK seeder for SQL Server RDS databases","archived":false,"fork":false,"pushed_at":"2023-01-06T11:53:14.000Z","size":787,"stargazers_count":8,"open_issues_count":18,"forks_count":2,"subscribers_count":1,"default_branch":"master","last_synced_at":"2026-01-14T07:35:09.013Z","etag":null,"topics":["aws-cdk","cdk","cdk-seeder","rds-mssql","sql-server"],"latest_commit_sha":null,"homepage":"","language":"PowerShell","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/kolomied.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}},"created_at":"2020-07-05T14:42:05.000Z","updated_at":"2025-11-19T10:24:01.000Z","dependencies_parsed_at":"2023-02-06T00:45:56.636Z","dependency_job_id":null,"html_url":"https://github.com/kolomied/cdk-sqlserver-seeder","commit_stats":null,"previous_names":["kolomied/aws-cdk-sqlserver-seeder"],"tags_count":8,"template":false,"template_full_name":null,"purl":"pkg:github/kolomied/cdk-sqlserver-seeder","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kolomied%2Fcdk-sqlserver-seeder","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kolomied%2Fcdk-sqlserver-seeder/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kolomied%2Fcdk-sqlserver-seeder/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kolomied%2Fcdk-sqlserver-seeder/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/kolomied","download_url":"https://codeload.github.com/kolomied/cdk-sqlserver-seeder/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kolomied%2Fcdk-sqlserver-seeder/sbom","scorecard":{"id":566478,"data":{"date":"2025-08-11","repo":{"name":"github.com/kolomied/cdk-sqlserver-seeder","commit":"f2115456a0840c34c307cbe6e96020123cb89380"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":2.5,"checks":[{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"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":"Code-Review","score":0,"reason":"Found 0/28 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":"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":"Token-Permissions","score":0,"reason":"detected GitHub workflow tokens with excessive permissions","details":["Warn: no topLevel permission defined: .github/workflows/build.yml:1","Warn: no topLevel permission defined: .github/workflows/jsii-pre-publish.yml:1","Warn: no topLevel permission defined: .github/workflows/jsii-publish.yml: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":"Pinned-Dependencies","score":0,"reason":"dependency not pinned by hash detected -- score normalized to 0","details":["Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/build.yml:18: update your workflow using https://app.stepsecurity.io/secureworkflow/kolomied/cdk-sqlserver-seeder/build.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/build.yml:20: update your workflow using https://app.stepsecurity.io/secureworkflow/kolomied/cdk-sqlserver-seeder/build.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/jsii-pre-publish.yml:22: update your workflow using https://app.stepsecurity.io/secureworkflow/kolomied/cdk-sqlserver-seeder/jsii-pre-publish.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/jsii-pre-publish.yml:27: update your workflow using https://app.stepsecurity.io/secureworkflow/kolomied/cdk-sqlserver-seeder/jsii-pre-publish.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/jsii-publish.yml:18: update your workflow using https://app.stepsecurity.io/secureworkflow/kolomied/cdk-sqlserver-seeder/jsii-publish.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/jsii-publish.yml:23: update your workflow using https://app.stepsecurity.io/secureworkflow/kolomied/cdk-sqlserver-seeder/jsii-publish.yml/master?enable=pin","Warn: npmCommand not pinned by hash: .github/workflows/build.yml:25","Info:   0 out of   6 GitHub-owned GitHubAction dependencies pinned","Info:   0 out of   1 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":"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":"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":"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":"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":"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":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'master'"],"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":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 4 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}},{"name":"Vulnerabilities","score":0,"reason":"45 existing vulnerabilities detected","details":["Warn: Project is vulnerable to: GHSA-968p-4wvh-cqc8","Warn: Project is vulnerable to: GHSA-67hx-6x53-jw92","Warn: Project is vulnerable to: GHSA-v88g-cgmw-v5xw","Warn: Project is vulnerable to: GHSA-93q8-gq69-wqmw","Warn: Project is vulnerable to: GHSA-fwr7-v2mv-hh25","Warn: Project is vulnerable to: GHSA-rrc9-gqf8-8rwg","Warn: Project is vulnerable to: GHSA-pp7h-53gx-mx7r","Warn: Project is vulnerable to: GHSA-v6h2-p8h4-qcjw","Warn: Project is vulnerable to: GHSA-grv7-fg5c-xmjg","Warn: Project is vulnerable to: GHSA-3xgq-45jj-v275","Warn: Project is vulnerable to: GHSA-gxpj-cx7g-858c","Warn: Project is vulnerable to: GHSA-w573-4hg7-7wgq","Warn: Project is vulnerable to: GHSA-9j49-mfvp-vmhm","Warn: Project is vulnerable to: GHSA-fjxv-7rqg-78g4","Warn: Project is vulnerable to: GHSA-ww39-953v-wcq6","Warn: Project is vulnerable to: GHSA-43f8-2h32-f4cj","Warn: Project is vulnerable to: GHSA-78xj-cgh5-2h22","Warn: Project is vulnerable to: GHSA-2p57-rm9w-gvfp","Warn: Project is vulnerable to: GHSA-896r-f27r-55mw","Warn: Project is vulnerable to: GHSA-9c47-m6qq-7p4h","Warn: Project is vulnerable to: GHSA-p6mc-m468-83gw","Warn: Project is vulnerable to: GHSA-29mw-wpgm-hmr9","Warn: Project is vulnerable to: GHSA-35jh-r3h4-6jhm","Warn: Project is vulnerable to: GHSA-82v2-mx6x-wq7q","Warn: Project is vulnerable to: GHSA-952p-6rrq-rcjv","Warn: Project is vulnerable to: GHSA-f8q6-p94x-37v3","Warn: Project is vulnerable to: GHSA-xvch-5gv4-984h","Warn: Project is vulnerable to: GHSA-4c7m-wxvm-r7gc","Warn: Project is vulnerable to: GHSA-pch5-whg9-qr2r","Warn: Project is vulnerable to: GHSA-5fw9-fq32-wv5p","Warn: Project is vulnerable to: GHSA-hj48-42vr-x3v9","Warn: Project is vulnerable to: GHSA-hrpp-h998-j3pp","Warn: Project is vulnerable to: GHSA-p8p7-x288-28g6","Warn: Project is vulnerable to: GHSA-c2qf-rxjj-qqgw","Warn: Project is vulnerable to: GHSA-52f5-9888-hmc6","Warn: Project is vulnerable to: GHSA-jgrx-mgxx-jf9v","Warn: Project is vulnerable to: GHSA-72xf-g2v4-qvf3","Warn: Project is vulnerable to: GHSA-j8xg-fqg3-53r7","Warn: Project is vulnerable to: GHSA-6fc8-4gx4-v693","Warn: Project is vulnerable to: GHSA-3h5v-q93c-6h6q","Warn: Project is vulnerable to: GHSA-776f-qx25-q3cc","Warn: Project is vulnerable to: GHSA-h6q6-9hqw-rwfv","Warn: Project is vulnerable to: GHSA-5fg8-2547-mr8q","Warn: Project is vulnerable to: GHSA-crh6-fp67-6883","Warn: Project is vulnerable to: GHSA-c4w7-xm78-47vh"],"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-20T15:06:28.727Z","repository_id":39574315,"created_at":"2025-08-20T15:06:28.727Z","updated_at":"2025-08-20T15:06:28.727Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28892890,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-29T21:06:44.224Z","status":"ssl_error","status_checked_at":"2026-01-29T21:06:42.160Z","response_time":59,"last_error":"SSL_read: 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":["aws-cdk","cdk","cdk-seeder","rds-mssql","sql-server"],"created_at":"2024-08-01T00:01:09.834Z","updated_at":"2026-01-30T01:16:20.767Z","avatar_url":"https://github.com/kolomied.png","language":"PowerShell","funding_links":[],"categories":["Construct Libraries"],"sub_categories":["Databases"],"readme":"# cdk-sqlserver-seeder [![Mentioned in Awesome CDK](https://awesome.re/mentioned-badge.svg)](https://github.com/eladb/awesome-cdk)\n![build](https://github.com/kolomied/cdk-sqlserver-seeder/workflows/build/badge.svg)\n![jsii-publish](https://github.com/kolomied/cdk-sqlserver-seeder/workflows/jsii-publish/badge.svg)\n![downloads](https://img.shields.io/npm/dt/cdk-sqlserver-seeder)\n\n[![npm version](https://badge.fury.io/js/cdk-sqlserver-seeder.svg)](https://badge.fury.io/js/cdk-sqlserver-seeder)\n[![PyPI version](https://badge.fury.io/py/cdk-sqlserver-seeder.svg)](https://badge.fury.io/py/cdk-sqlserver-seeder)\n[![NuGet version](https://badge.fury.io/nu/Talnakh.SqlServerSeeder.svg)](https://badge.fury.io/nu/Talnakh.SqlServerSeeder)\n[![Maven Central](https://img.shields.io/maven-central/v/xyz.talnakh/SqlServerSeeder?color=brightgreen)](https://repo1.maven.org/maven2/xyz/talnakh/SqlServerSeeder/)\n\nA simple CDK seeder for SQL Server RDS databases.\n\nWhen you create an RDS SQL Server instance using CloudFormation template, there is no way to provide initial \nschema definition as part of CloudFormation stack deployment. Custom schema deployment scripts can be executed \nonly after the database deployment is complete. \n\n*cdk-sqlserver-seeder* library is a [AWS CDK](https://aws.amazon.com/cdk/) construct that provides a way to automate \nthis process and eliminate manual steps involved in the process of preparing new RDS SQL Server environment by \nexecuting custom SQL scripts on RDS SQL Server instance creation/deletion.\n\nThe construct relies on [Invoke-SqlCmd](https://docs.microsoft.com/en-us/powershell/module/sqlserver/invoke-sqlcmd) cmdlet \nto run the scripts and provides a way to handle transient errors during stack provisioning.\n\n## Usage\n\n```typescript\nimport * as cdk from '@aws-cdk/core';\nimport * as ec2 from '@aws-cdk/aws-ec2';\nimport * as rds from '@aws-cdk/aws-rds';\nimport { SqlServerSeeder } from 'cdk-sqlserver-seeder';\n\nexport class DatabaseStack extends cdk.Stack {\n    constructor(scope: cdk.Construct, id: string, props?: cdk.StackProps) {\n        super(scope, id, props);\n\n        const sqlServer = new rds.DatabaseInstance(this, 'Instance', {\n            engine: rds.DatabaseInstanceEngine.SQL_SERVER_WEB,\n            // all other properties removed for clarity\n        });\n\n        const seeder = new SqlServerSeeder(this, \"SqlSeeder\", { \n            database: sqlServer,\n            port: 1433,\n            vpc: vpc,\n            createScriptPath: \"./SQL/v1.0.0.sql\", // script to be executed on resource creation\n            deleteScriptPath: \"./SQL/cleanup.sql\" // script to be executed on resource deletion\n        });\n    }\n}\n```\n\n## Configuration properties\nSqlServerSeeder construct accepts the following configuration properties:\n\n| Parameter  | Required  | Default | Description |\n|---|---|---|---|\n| `vpc`              | yes |       | VPC for Lambda function deployment      | \n| `database`         | yes |       | RDS SQL Server database instance        |\n| `createScriptPath` | yes |       | SQL scripts to run on resource creation |\n| `deleteScriptPath` | no  |       | SQL script to run on resource deletion  |\n| `port`             | no  | 1433  | RSD SQL Server database port            |\n| `memorySize`       | no  | 512   | Lambda function memory size             |\n| `ignoreSqlErrors`  | no  | false | Whether to ignore SQL error or not      |\n\n## Architecture\n\n![Architecture](/doc/architecture.png)\n\n`cdk-sqlserver-seeder` deploys a custom resource backed by PowerShell lambda to connect to SQL Server instance. Lambda function is deployed in private subnets of your VPC where RDS instance resides.\n\nLambda function retrieves database credentials from [AWS Secrets Manager](https://aws.amazon.com/secrets-manager/) and uses them to construct connection string to the database.\n\nSQL scripts are uploaded into S3 bucket during CDK application deployment.\nLambda function downloads these scripts during execution.\n\n## Security considerations\nLambda function has the following permissions:\n\n- Managed policies\n   - `AWSLambdaBasicExecutionRole` for CloudWatch logs\n   - `AWSLambdaVPCAccessExecutionRole` for VPC access\n- Inline policy\n  - `secretsmanager:GetSecretValue` for RDS credentials secret\n  - `s3:GetObject*`, `s3:GetBucket*`, `s3:List*` for S3 bucket with SQL scripts\n\n## Acknowledgements\nThe whole project inspired by [aws-cdk-dynamodb-seeder](https://github.com/elegantdevelopment/aws-cdk-dynamodb-seeder). \nI though it would be very helpful to have a similar way to seed initial schema to more traditional SQL Server databases.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkolomied%2Fcdk-sqlserver-seeder","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkolomied%2Fcdk-sqlserver-seeder","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkolomied%2Fcdk-sqlserver-seeder/lists"}