Retrive Sast score of build using Azure devops api - azure-devops-rest-api

I have set up a build pipeline to include Veracode scan and import results to true. once the build is successful I can see the Veracode score from the Veracode summary tab on the build page. Is there an API endpoint in azure DevOps API to retrieve this score to show in my web application?

Related

AzureDevOps iOS build fastlane use Apple API Key

I've created an Azure DevOps pipeline for building a React Native mobile application for iOS. I have a service connection to Apple's App Store Connect and it uploads the build to TestFlight as expected. I am also passing Release Notes to the AppStoreRelease task and this requires FastLane credentials to get around the Two Factor Authentication.
I tried the approach of creating a fastlane session ID locally and putting that onto the service connection as per https://github.com/fastlane/fastlane/blob/master/spaceship/README.md#support-for-ci-machines. This approach works fine but the session times out and it has to be done again which isn't a sustainable approach.
I've seen documentation on using App Store Connect keys to authenticate (https://docs.fastlane.tools/app-store-connect-api/), but haven't seen any documentation on how to do this for Azure DevOps. Has anyone done this and can provide documentation or a point in the right direction.

List Bitbucket accounts with failed login attempts / count using API

Is it possible to get a list with users from our Bitbucket server that has information about failed login attempts?
Can I use the API? Query the database? Code snippets?
This information can be obtained in the application logs. Usually at $BITBUCKET_HOME/log.
You can see more about this topic at Bitbucket's Knowledge Base

How to validate Service Account based authentication in Cloud Dataflow

How to validate Dataflow Java code using Google Service Account?
Currently we are passing user credential to select/validate the Google project for executing Dataflow runner. Instead we need to validate the Dataflow code with Service Account.
It would be good if some one share the Java code to validate the Dataflow Job with Service Account.
To use the service account to communicate to Google Cloud all you have to do is to download the JSON file that contains your service account key and change the environment variable of the system to:
For Linux/MacOS:
export GOOGLE_APPLICATION_CREDENTIALS="/home/user/Downloads/service-account-file.json"
For Windows:
$env:GOOGLE_APPLICATION_CREDENTIALS="C:\Users\username\Downloads\[FILE_NAME].json"
You can get this key from the GCP console, select the Service Account you require, select JSON type and then click on create. You now have the JSON file containing your key on your machine.
You then run the job with:
--serviceAccount=service-account#my-project.iam.gserviceaccount.com
This flag runs with the service account mail. You can get the service account mail from the IAM panel of the Google Console. Also, remember to give the service account the appropriated roles and permissions.
To change the name of the job, you can use --jobName=[your_job_name] in order to give an specific name. If you are running the example from the
Quickstart Using Java and Apache Maven documentation, then your job name is going to use part of your username as default.

TFS Build 2015 - Get Capabilities of Build Agents

I am trying to programmatically find the Capabilities of each Build Agent.
I found the Rest-API to list all Build Agents
http://[tfsurl]/_apis/distributedtask/pools/[poolid]/agents?api-version=2.3-preview.1
But this will only show the basic information of the agent.
Is there a way to get more detailed information on the Agents and its Capabilities ?
Additionally, is there a good page with the REST-API options, i have not able to find above API link in the documentation anywhere, i found it on another SO page.
The agent REST API is undocumented, see REST API Overview for Visual Studio Team Services and Team Foundation Server for more information.
However you can use tools such as Fiddler to track the the API, following below steps to get Capabilities of Build Agents with REST API:
Get Pool ID :
GET http://server:8080/tfs/_apis/distributedtask/pools/
Get Agent ID based on the pool ID :
GET http://server:8080/tfs/_apis/distributedtask/pools/39/agents/
Get the Capabilities of the specific Build Agent:
GET http://server:8080/tfs/_apis/distributedtask/pools/39/agents/158?includeCapabilities=true
If you just want to get the information of the Agents and its Capabilities, the simplest way is via the web portal:
Go to TFS Home page : http://server:8080/tfs/_home
Navigate to Manage Server (gear icon) > Agent Pools > Select a pool > Select the agent > Capabilities

Missing service account

My pipeline doesn't start due to error:
(8e45efed0ad51300): Workflow failed. Causes: (8e45efed0ad51e7b): There was a problem refreshing your credentials.
Please check:
1. Dataflow API is enabled for your project.
2. There is a robot service account for your project: [project number]#cloudservices.gserviceaccount.com should have access to your project. If this account does not appear in the permissions tab for your project, contact Dataflow support.
I assume that Dataflow API is enabled as I'm able to reach Dataflow monitoring console, so first requirement is fulfilled. Second isn't. There is no a single account in the domain cloudservices.gserviceaccount.com.
Where can I ask for such help without paid support plan?
If you disable and then re-enable the Dataflow API for your project that should create the missing service account.
Hope that helps!

Resources