New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

azgo

Package Overview
Dependencies
Maintainers
1
Versions
8
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

azgo

- [Azure Tooling](#azure-tooling) - [Function of this CLI](#function-of-this-cli) - [Prerequisites](#prerequisites) - [Installation](#installation) - [Authentication](#authentication) - [Usage](#usage) - [List all subscriptions](#list-all-su

  • 0.0.3
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

Azure Tooling

Function of this CLI

This CLI has been created to add additional functionality to Azure CLI such as data aggregation from multiple az commands, reporting, and pulling data from both Azure DevOps and Azure.

Some of the reporting functionality is around container vulnerability scanning with the ability to install a web portal as an Azure Web App in development

This CLI is still very much under development, and functions with the test- prefix are considered not yet ready

This is my first public project, so any advice is appreciated and taken onboard. Also, having never REALLY done unit testing in NodeJS before, I have finally begun. I know, I know...

Prerequisites

Azure CLI must be installed and logged in. For any Azure DevOps functions, a Personal Access Token must be set at AZURE_DEVOPS_EXT_PAT environment variable

You can obtain a Personal Access Token from https://dev.azure.com/YOUR_ORGANIZATION/_usersSettings/tokens

Then set the token as your environment variable using the following: Linux/macOS:

export AZURE_DEVOPS_EXT_PAT=TOKEN

Windows CMD:

set AZURE_DEVOPS_EXT_PAT=TOKEN

Winows Powershell:

$env:AZURE_DEVOPS_EXT_PAT=TOKEN"

Installation

First clone the repo

git clone git@github.com:jERCle/azgo.git

CD to repositoriy then install dependencies

cd azure-tooling && npm install

Use npm link azgo to link to newmain.js

npm link

Authentication

You must be logged in with azure cli as this uses the authentication provided by the user currently logged into Azure CLI

For Azure DevOps functionality, you must have a Personal Access Token saved to AZURE_DEVOPS_EXT_PAT environment variable as per Function of this CLI

Usage

List all subscriptions

Lists all subscriptions currently configured with az login. Similar to az account list but groups by TenantID

azgo subs

Output:

[
  {
    "name": "NAME1",
    "subscriptionId": "00000000-0000-0000-0000-000000000000"
  },
  {
    "name": "NAME2",
    "subscriptionId": "00000000-0000-0000-0000-000000000000"
  }
]

Set current active subscription

Provides a small UI wrapper over az account set --subscription to select current active subscription. Gives a list of available subscriptions without the need to find the required ID and past into a flag

azgo subs active

List Files Within File Share

azgo ls -n <share name> -c <connection string>

Output:

[
  "...",
  {
    "name": "DEMO_20418320215715517421919197105_1.kml",
    "lastModified": "2022-02-24T02:42:43.000Z"
  },
  "..."
]

List Keyvault Secrets

azgo secrets -n <appName> -e <appEnv> -s <subscription ID>

Output:

[
  "...",
  {
    "secretName": "dockerRegistryUsername",
    "createdOn": "2022-02-03T02:43:26.000Z",
    "updatedOn": "2022-02-03T02:43:26.000Z",
    "id": "https://KV_NAME.vault.azure.net/secrets/dockerRegistryUsername/018247089124702847"
  },
  "..."
]

Get App Service Plan Info

azgo asp -n <appName> -e <appEnv> -s <subscription ID>

Output:

{
  "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/RESOURCE_GROUP/providers/Microsoft.Web/serverfarms/APP_SERVICE_PLAN",
  "name": "APP_SERVICE_PLAN",
  "kind": "linux",
  "location": "Australia East",
  "type": "Microsoft.Web/serverfarms",
  "tags": {},
  "sku": {
    "name": "P1v3",
    "tier": "PremiumV3",
    "size": "P1v3",
    "family": "Pv3",
    "capacity": 1
  },
  "workerTierName": null,
  "status": "Ready",
  "subscription": "00000000-0000-0000-0000-000000000000",
  "hostingEnvironmentProfile": null,
  "maximumNumberOfWorkers": 30,
  "geoRegion": "Australia East",
  "perSiteScaling": false,
  "elasticScaleEnabled": false,
  "maximumElasticWorkerCount": 1,
  "numberOfSites": 1,
  "isSpot": false,
  "spotExpirationTime": null,
  "freeOfferExpirationTime": null,
  "resourceGroup": "RESOURCE_GROUP",
  "reserved": true,
  "isXenon": false,
  "hyperV": false,
  "targetWorkerCount": 0,
  "targetWorkerSizeId": 0,
  "provisioningState": "Succeeded",
  "kubeEnvironmentProfile": null,
  "zoneRedundant": false
}

List App Service Configuration

azgo app -n <appName> -e <appEnv> -s <subscription ID>

Output:

{
  "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/RESOURCE_GROUP/providers/Microsoft.Web/sites/APP_SERVICE/config/web",
  "name": "APP_SERVICE",
  "type": "Microsoft.Web/sites/config",
  "numberOfWorkers": 1,
  "defaultDocuments": [
    "Default.htm",
    "Default.html",
    "Default.asp",
    "index.htm",
    "index.html",
    "iisstart.htm",
    "default.aspx",
    "index.php",
    "hostingstart.html"
  ],
  "netFrameworkVersion": "v4.0",
  "phpVersion": "",
  "pythonVersion": "",
  "nodeVersion": "",
  "powerShellVersion": "",
  "linuxFxVersion": "DOCKER|USER/IMAGE:TAG",
  "windowsFxVersion": null,
  "requestTracingEnabled": false,
  "remoteDebuggingEnabled": false,
  "remoteDebuggingVersion": "VS2019",
  "httpLoggingEnabled": true,
  "acrUseManagedIdentityCreds": true,
  "acrUserManagedIdentityID": "",
  "logsDirectorySizeLimit": 80,
  "detailedErrorLoggingEnabled": false,
  "publishingUsername": "$",
  "appSettings": null,
  "connectionStrings": null,
  "machineKey": null,
  "handlerMappings": null,
  "documentRoot": null,
  "scmType": "None",
  "use32BitWorkerProcess": true,
  "webSocketsEnabled": false,
  "alwaysOn": true,
  "javaVersion": null,
  "javaContainer": null,
  "javaContainerVersion": null,
  "appCommandLine": "",
  "managedPipelineMode": "Integrated",
  "virtualApplications": [
    {
      "virtualPath": "/",
      "physicalPath": "site\\wwwroot",
      "preloadEnabled": true,
      "virtualDirectories": null
    }
  ],
  "loadBalancing": "LeastRequests",
  "experiments": {
    "rampUpRules": []
  },
  "limits": null,
  "autoHealEnabled": false,
  "autoHealRules": null,
  "tracingOptions": null,
  "vnetName": "VNET_OR_SUBNET_NAME",
  "vnetRouteAllEnabled": false,
  "vnetPrivatePortsCount": 0,
  "cors": {
    "allowedOrigins": null,
    "supportCredentials": false
  },
  "push": null,
  "apiDefinition": null,
  "apiManagementConfig": null,
  "autoSwapSlotName": null,
  "localMySqlEnabled": false,
  "managedServiceIdentityId": 27098,
  "xManagedServiceIdentityId": null,
  "keyVaultReferenceIdentity": null,
  "ipSecurityRestrictions": [
    {
      "ipAddress": "10.0.0.1/32",
      "action": "Allow",
      "tag": "Default",
      "priority": 10,
      "name": "Allow-in"
    },
    {
      "ipAddress": "Any",
      "action": "Deny",
      "priority": 2147483647,
      "name": "Deny all",
      "description": "Deny all access"
    }
  ],
  "scmIpSecurityRestrictions": [
    {
      "ipAddress": "Any",
      "action": "Allow",
      "priority": 1,
      "name": "Allow all",
      "description": "Allow all access"
    }
  ],
  "scmIpSecurityRestrictionsUseMain": false,
  "http20Enabled": false,
  "minTlsVersion": "1.2",
  "scmMinTlsVersion": "1.0",
  "ftpsState": "Disabled",
  "preWarmedInstanceCount": 0,
  "functionAppScaleLimit": 0,
  "healthCheckPath": null,
  "functionsRuntimeScaleMonitoringEnabled": false,
  "websiteTimeZone": null,
  "minimumElasticInstanceCount": 0,
  "azureStorageAccounts": {
    "logmount": {
      "type": "AzureFiles",
      "accountName": "storageaccountname",
      "shareName": "sharename",
      "accessKey": null,
      "mountPath": "/usr/local/tomcat/logs",
      "state": "Ok"
    }
  },
  "publicNetworkAccess": null,
  "location": "Australia East",
  "tags": {}
}

Build Package

Node: NodeJS is required to package app

Install the following package pkg globally

npm install -g pkg

pkg is created by Vercel - doco available at https://github.com/vercel/pkg

While in the root of the project, run the following:

pkg .

This will use the default configuration and output binaries for Windows, Linux, and macOS

Running the binary

./[app-name] create is identical to running node . from root of source

FAQs

Package last updated on 15 Jun 2022

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc