Maven / GitOps Interview Questions
How does GitOps improve security and auditability compared to script-based deployments?
Script-based deployments scatter cluster-write credentials across CI systems, developer laptops, and shared servers. Any engineer with access to the deployment script or its secrets can push arbitrary changes to production with no mandatory review. Audit trails, when they exist at all, are CI job logs that expire after a few weeks.
GitOps addresses these weaknesses through several concrete mechanisms:
- Immutable audit trail: Every change to cluster state must be a Git commit, signed with the author's identity and timestamped by the VCS.
git log --followshows the complete history of every resource, who changed it, when, and why (via commit message). This satisfies SOC 2 Type II, PCI-DSS, and ISO 27001 change-management requirements without a separate audit tool. - Mandatory code review: Branch protection rules require pull-request review before any change merges to the deploy branch. This adds a human approval gate that script-based pipelines typically lack.
- No human direct cluster access: In a mature GitOps setup, engineers do not need kubeconfig with write permissions. The operator holds the only write credential. Even if an engineer's laptop is compromised, the attacker cannot directly alter the cluster — they would need to also compromise Git and pass branch-protection checks.
- Credentials stay in the cluster: Pull-based deployment means CI systems never hold cluster tokens. Reducing the number of places a kubeconfig exists reduces the attack surface.
- Signed commits: GPG or SSH-signed commits cryptographically link every change to a verified identity, making it impossible to forge the commit author after the fact.
- Automated policy checks in CI: Tools like Conftest (OPA) or Kyverno CLI can validate manifests in the PR pipeline before they ever reach the cluster — shifting security left.
Invest now in Acorns!!! 🚀
Join Acorns and get your $5 bonus!
Acorns is a micro-investing app that automatically invests your "spare change" from daily purchases into diversified, expert-built portfolios of ETFs. It is designed for beginners, allowing you to start investing with as little as $5. The service automates saving and investing. Disclosure: I may receive a referral bonus.
Invest now!!! Get Free equity stock (US, UK only)!
Use Robinhood app to invest in stocks. It is safe and secure. Use the Referral link to claim your free stock when you sign up!.
The Robinhood app makes it easy to trade stocks, crypto and more.
Webull! Receive free stock by signing up using the link: Webull signup.
More Related questions...
