function main(sourceName = 'FULL_PATH_TO_SOURCE') {
  // [START securitycenter_update_source]
  // Imports the Google Cloud client library.
  const {SecurityCenterClient} = require('@google-cloud/security-center');

  // Creates a new client.
  const client = new SecurityCenterClient();
  // sourceName is the full resource path to the update target.
  /*
   * TODO(developer): Uncomment the following lines
   */
  // const sourceName = "organizations/111122222444/sources/1234";
  async function updateSource() {
    const [source] = await client.updateSource({
      source: {
        name: sourceName,
        displayName: 'New Display Name',
      },
      // Only update the display name field (if not set all mutable
      // fields of the source will be updated.
      updateMask: {paths: ['display_name']},
    });
    console.log('Updated source: %j', source);
  }

  updateSource();
  // [END securitycenter_update_source]
}
updateSource demonstrates how to update fields on a security findings
source.