Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in
Celebration

Earn badges and make progress

You're on your way to the next level! Join the Kudos program to earn points and save your progress.

Deleted user Avatar
Deleted user

Level 1: Seed

25 / 150 points

Next: Root

Avatar

1 badge earned

Collect

Participate in fun challenges

Challenges come and go, but your rewards stay with you. Do more to earn more!

Challenges
Coins

Gift kudos to your peers

What goes around comes around! Share the love by gifting kudos to your peers.

Recognition
Ribbon

Rise up in the ranks

Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!

Leaderboard

Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
4,456,658
Community Members
 
Community Events
176
Community Groups

List all files in repository or branch of repository using API 2.0

Hello Community!

I want to list all the files in repository usin API 2.0

the goal is to review extensions and alert users if they are pushing unauthorized data

I need to monitor the file the user and the repository 

Thanks

2 answers

Hi @BEN MOUSSA Anis-ext

Thank you for your question!

It could be your case to use Bitbucket Pipe: Git secrets scan: Scan your files for hardcoded sensitive data and create a security report.

By default, the pipe will scan your files for hardcoded AWS credentials and create a security report with annotations for each found credential.

If a value for CUSTOM_PATTERN is provided, it will scan for and AWS credentials and CUSTOM_PATTERN.

If the CUSTOM_PATTERN is not provided, it will scan for AWS credentials only.

 

In the repository turn on Bitbucket Pipelines and add the pipe:

Run a scan for AWS credentials:

script:
  - pipe: atlassian/git-secrets-scan:0.6.0

or

Scan custom secrets using a pattern that matches
Bitly's secret key file (^R_[0-9a-f]{32}$):

script:
  - pipe: atlassian/git-secrets-scan:0.6.0
    variables:
      CUSTOM_PATTERN: '^R_[0-9a-f]{32}$'

 

Best regards,
Oleksandr Kyrdan

0 votes
Karthick S Atlassian Team Apr 20, 2022

Hello @BEN MOUSSA Anis-ext

Welcome to the Atlassian Community.

In Bitbucket Cloud, you may try this API to Get file or directory contents in the repository. 

Let us know if you have any queries.

Kind regards,

Karthick S

Suggest an answer

Log in or Sign up to answer
TAGS

Atlassian Community Events