Safeguard
Security Guides•

What extra files does a generated SDK ship, and are they safe?

Generators can emit CI configs, a git push script and metadata folders along with code. What to keep, what to delete and what to review before publishing.

Safeguard Security Team
4 min read

Beyond source code, a generator can write CI configuration, a git push helper, build files and a metadata folder. Review every extra file before you publish an SDK. Keep what you understand, delete what you do not use, and make sure none of it carries stale settings or credentials into a public repository.

What the docs say it can emit

The workflow integration page describes a few of these:

  • A git push helper script, git_push.sh, to streamline pushing an auto generated SDK to GitHub. The example passes a git user id, a repository id and a release note to the generator, then you run the script from the output directory.
  • Some generators also write CI configuration files, with a Travis configuration given as the example, so the output is ready to be tested by that CI.

The post processing page's log output also shows the generator writing a .openapi-generator folder with VERSION and FILES entries, along with spec and test helper files for Ruby.

Why extras deserve a look

Extra fileConcern
CI configurationMay name a service you do not use, or an old runner image, or run steps with broad permissions
Push scriptPushes whatever is in the directory, including local files you did not mean to share
Build and manifest filesDeclare dependencies and repository sources
Test and spec scaffoldingMay pull in test dependencies
Metadata folderHarmless, and useful for tracing the tool version
README and docsMay include sample values, URLs or wording you do not want to publish

A pre-publish routine

  1. List everything in the output directory and mark each file as keep, change or delete.
  2. Delete CI files for services you do not use. Replace the rest with your own pipeline definition, which has pinned actions and minimal permissions.
  3. Read the push script before running it. Check the target remote, the branch and what it adds. Run it from a clean directory so local stray files are not included.
  4. Look at the build file for dependency versions and any repository URLs. Make sure they point at your approved registries.
  5. Search the tree for anything that looks like a credential, an internal host name or a test token. Generated examples sometimes copy values from the spec.
  6. Check licence information in the package metadata. Your own licence should be stated correctly.
  7. Run dependency scanning on the final tree, not on the spec.

Keep a record

Commit the metadata folder, and note in the release the generator version and the spec version used. That lets a customer, or you, trace an SDK build back to its inputs. For a customer facing view of the same idea, see how to ask a vendor for an SBOM.

Where Safeguard fits

Safeguard produces an SBOM for the final SDK tree, and policy gates can hold a release pull request until dependency findings are resolved.

Try it yourself

Click through it at your own pace, or open it full screen. Look at the component list a final SDK tree would produce.

Quick check

Does every generator write CI files?

No. The docs say some generators do. Check the output of the one you use.

Can I just run the push script as is?

You can, but read it first and run it from a clean output directory, since it pushes what is there.

Sources

Last reviewed: 19 October 2026.

Never miss an update

Weekly insights on software supply chain security, delivered to your inbox.

Self-healing security runs on Safeguard.

Your first fix PR is minutes away.

No sales call required, even your agent can complete the purchase over MCP.