Git Product home page Git Product logo

cabbie's Introduction

Cabbie

Go Tests release

Overview

Cabbie is a standalone Go binary that utilizes the Windows Update Agent API to search, download, and install Windows Updates. Cabbie can be configured to connect to the public Windows Updates or to a local WSUS server.

The cabbie client has multiple flags, subcommands and subcommand arguments. For an up-to-date list type cabbie help which will list command help.

Similarly, cabbie flags will show available flags.

Getting Started

Pre-compiled binaries are available as release assets.

Building Cabbie manually:

  1. Clone the repository
  2. Install any missing imports with go get -u
  3. Run go build C:\Path\to\cabbie\src

Configuration Options

These options can be configured using the registry key at HKLM:\SOFTWARE\Google\Cabbie

Setting Registry Type Default Setting Description
------------------ ------------- ------------------ ------------------
WSUSServers REG_MULTI_SZ nil List of WSUS servers to connect to instead of Microsoft updates.
RequiredCategories REG_MULTI_SZ Critical Updates Definition Updates Security Updates List of Update categories that an update must contain at least one of to be automatically installed.
UpdateDrivers REG_DWORD 0 Allow Cabbie to install available drivers.
UpdateVirusDef REG_DWORD 1 Allow Cabbie to install updated virus definitions every 30 minutes.
EnableThirdParty REG_DWORD 0 Allow Cabbie to check for third party software updates such off MSFT Office and Adobe.
RebootDelay REG_DWORD 21600 Time in seconds for Cabbie to wait before force rebooting a machine to finalize update installation.
Deadline REG_DWORD 14 Number of days before Cabbie will force install an available update that matches the required categories. Set to "0" to disable this option.
NotifyAvailable REG_DWORD 1 If enabled Cabbie will send a notification when new required updates are available to be installed.
AukeraEnabled REG_DWORD 0 Enable Cabbie to use the open source Aukera maintenance window manager.
AukeraPort REG_DWORD 9119 LocalHost port to check against for Aukera maintenance windows.
AukeraName REG_SZ Cabbie Aukera maintenance window label to query for to determine if a maintenance window is currently open.
ScriptTimeout REG_DWORD 10 Pre/Post Update script timeout in minutes.

Pre/Post Update script execution

Cabbie has the ability to run predefined scripts before and after each Windows update install session. Each script is executed with a configurable timeout (default 10 minutes) and will be automatically stopped if the timeout is reached.

The scripts will need to be PowerShell scripts named PreUpdate.ps1 and/or PostUpdate.ps1 located in the Cabbie root directory (C:\Program Files\Google\Cabbie).

PreUpdate.ps1: This script will be executed once before the fist update in the collection is download and installed.

PostUpdate.ps1: This script will be executed after the last update in the collection is installed.

Command-line Usage

cabbie.exe <flags> <subcommand> <subcommand args>

List

Queries Microsoft for Windows Updates that are available to the device.

cabbie list

Install

Searches, downloads, and installs updates from Microsoft or a configured local WSUS.

Install all required updates (Default: security and critical updates):

cabbie install

Update available drivers:

cabbie install -drivers

Update virus definitions:

cabbie install -virus_def

Install specific update KBs:

cabbie install -kbs="1234513,98765432"

Install all applicable updates:

cabbie install -all

History

Retrieves the recorded history of installed updates.

cabbie history

Hide

Hides or unhides an update from installation.

Hide a KB:

cabbie hide --kbs="1234513"

Make an update available for install:

cabbie hide --unhide --kbs="1234513"

Service

Manage the installation status of the Cabbie service.

Install Cabbie service:

cabbie service --install

Uninstall Cabbie service:

cabbie service --uninstall

Service Usage

Cabbie can run as a Windows Service to enable constant update and reboot management.

The basic steps to install the Cabbie service:

  1. Compile the Cabbie binary using go build C:\Path\to\cabbie\src.
  2. Copy the built cabbie.exe binary to the folder C:\Program Files\Google\Cabbie.
  3. From that folder, run .\cabbie.exe service --install

Cabbie service will now run as a service on that machine and check for updates using the configuration options above.

Enforcement Files

Cabbie enforcement files allow administrators to enforce specific update policies on a per-device basis. Enforcement files use JSON format, and can be written and maintained using any configuration management stack. Enforcements are particularly useful when deploying Cabbie as a service.

To create an enforcement, place a json file (ending in .json) under the Cabbie ProgramData directory (C:\ProgramData\Cabbie).

Required updates can be designated as a list of zero or more KB article strings under the required key. To hide an update from cabbie, place the KB article string under the hidden key.

Example:

{
  "required": [
    "123456"
  ],
  "hidden": [
    "456789"
  ]
}

Using a Maintenance Window

You can define a maintenance window for Cabbie to follow by installing and configuring the aukera service. Once configured, update the Cabbie registry options to AukeraEnabled= 1 and restart the Cabbie service.

Example Aukera Config

{
  "Windows": [
    {
      "Name": "Default Cabbie maintenance Window",
      "Format": 1,
      "Schedule": "0 40 10 * * THU",
      "Duration": "6h",
      "Starts": null,
      "Expires": null,
      "Labels": ["cabbie"]
    }
  ]
}

Disclaimer

Cabbie is maintained by a small team at Google. Support for this repo is treated as best effort, and issues will be responded to as engineering time permits.

This is not an official Google product.

cabbie's People

Contributors

bagarber avatar cjgenevi avatar dependabot[bot] avatar discentem avatar gitgerby avatar itsmattl avatar jm2 avatar joshuasahayaarul avatar quentin-nozomi avatar schachmat avatar tseknet avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

cabbie's Issues

Interactive installs get blocked by waiting for service

Running .\cabbie -debug install -all appears to wait for the default update interval. I'd expect the update to start immediately for an interactive run.

Screen Shot 2021-12-11 at 2 34 57 PM

Curiously, if it ctrl+c on the keyboard, Cabbie stops the service and proceeds immediately.
Screen Shot 2021-12-11 at 2 35 17 PM

Security Policy violation Binary Artifacts

This issue was automatically created by Allstar.

Security Policy Violation
Project is out of compliance with Binary Artifacts policy: binaries present in source code

Rule Description
Binary Artifacts are an increased security risk in your repository. Binary artifacts cannot be reviewed, allowing the introduction of possibly obsolete or maliciously subverted executables. For more information see the Security Scorecards Documentation for Binary Artifacts.

Remediation Steps
To remediate, remove the generated executable artifacts from the repository.

Artifacts Found

  • events.dll

Additional Information
This policy is drawn from Security Scorecards, which is a tool that scores a project's adherence to security best practices. You may wish to run a Scorecards scan directly on this repository for more details.


Allstar has been installed on all Google managed GitHub orgs. Policies are gradually being rolled out and enforced by the GOSST and OSPO teams. Learn more at http://go/allstar

This issue will auto resolve when the policy is in compliance.

Issue created by Allstar. See https://github.com/ossf/allstar/ for more information. For questions specific to the repository, please contact the owner or maintainer.

Notification package missing `RebootPopup` function

I get the following error when building Cabbie:

# github.com/google/cabbie/cablib
..\..\..\go\src\github.com\google\cabbie\cablib\cablib.go:149:2: undefined: notification.RebootPopup

Indeed the cablib package does reference RebootPopup from notification, but notification does not have the corresponding function.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.