Skip to content

Commit

Permalink
Merge pull request #2 from huntresslabs/dev
Browse files Browse the repository at this point in the history
Remove API, fix dev env
  • Loading branch information
HuskyHacks authored Aug 7, 2024
2 parents 4e001a3 + 52115ec commit 4306aa0
Show file tree
Hide file tree
Showing 12 changed files with 53 additions and 81 deletions.
33 changes: 31 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,37 @@ When Apps Go Rogue.

This repository documents observed the TTPs associated with OIDC/OAuth 2.0 application attacks.

For more information about this subject, please visit the [Wiki](https://github.com/huntresslabs/rogueapps/wiki).

## Contributing
If you want to contribue to the RogueApps project, please [open an Issue](https://github.com/huntresslabs/rogueapps/issues/new?assignees=&labels=new+rogueapp&projects=&template=custom.md&title=%5BNew+RogueApp%5D%3A+%28RogueApp+Name%29) Please follow the issue template and include details about the observed TTPs for the RogueApp. Please do not submit any sensitive, private, or proprietary information.
If you want to contribue to the RogueApps project, please review the [Wiki Contribution Guide](https://github.com/huntresslabs/rogueapps/wiki/Contribution-Guide) and [open an Issue](https://github.com/huntresslabs/rogueapps/issues/new?assignees=&labels=new+rogueapp&projects=&template=custom.md&title=%5BNew+RogueApp%5D%3A+%28RogueApp+Name%29). Please follow the issue template and include details about the observed TTPs for the RogueApp. Please do not submit any sensitive, private, or proprietary information.

## Adding Contributions
When a contribution is accepted into the repo, add the details of the contribution to the `rogueapps.json` file located in `public/`. The JSON entries are dynamically queried by the API and the entry cards are then rendered to the Home page.
When a contribution is accepted into the repo, add the details of the contribution to the `rogueapps.json` file located in `public/`. The JSON entries are dynamically queried by the API and the entry cards are then rendered to the Home page.

## Development Guide
### Dev Install

First, clone the repository (main or dev branch).

Next, change directories into the repo and installl the Node modules:

```
npm install
```

Now, start the dev server:
```
npm run dev
```
```
> rogueapps@0.1.0 dev
> next dev
▲ Next.js 14.2.5
- Local: http://localhost:3000
```
The dev server is now live at `localhost:3000`.



10 changes: 8 additions & 2 deletions app/about/page.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,13 @@
import styles from './page.module.css';
import styles from '../../styles/About.module.css';

export const metadata = {
title: 'About - RogueApps',
title: 'About RogueApps',
description: 'Learn more about RogueApps.',
viewport: {
width: 'device-width',
initialScale: 1,
},
themeColor: '#00f49c',
};

export default function About() {
Expand Down
2 changes: 1 addition & 1 deletion app/contribute/page.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
"use client";

import { useState, useEffect } from 'react';
import styles from './page.module.css';
import styles from '../../styles/Contribute.module.css';

interface RogueApp {
contributor: string;
Expand Down
34 changes: 5 additions & 29 deletions app/layout.tsx
Original file line number Diff line number Diff line change
@@ -1,12 +1,14 @@
import '../styles/globals.css';
import Head from 'next/head';
import Footer from './components/Footer';
import Navbar from './components/Navbar';
import '../styles/globals.css';

export const metadata = {
title: 'RogueApps',
description: 'RogueApps: when good OAuth apps go rogue.',
viewport: 'width=device-width, initial-scale=1',
viewport: {
width: 'device-width',
initialScale: 1,
},
keywords: 'OAuth, security, rogue apps, Huntress',
robots: 'index, follow',
themeColor: '#00f49c',
Expand Down Expand Up @@ -35,37 +37,11 @@ export const metadata = {
export default function RootLayout({ children }: { children: React.ReactNode }) {
return (
<html lang="en">
<Head>
<title>{metadata.title}</title>
<meta name="description" content={metadata.description} />
<meta name="viewport" content={metadata.viewport} />
<meta name="keywords" content={metadata.keywords} />
<meta name="robots" content={metadata.robots} />
<meta name="theme-color" content={metadata.themeColor} />
<link rel="icon" href={metadata.icons.icon} />
<meta property="og:title" content={metadata.openGraph.title} />
<meta property="og:description" content={metadata.openGraph.description} />
<meta property="og:type" content={metadata.openGraph.type} />
<meta property="og:url" content={metadata.openGraph.url} />
<meta property="og:image" content={metadata.openGraph.image} />
<meta property="og:site_name" content={metadata.openGraph.siteName} />
<meta property="og:locale" content={metadata.openGraph.locale} />
<meta name="twitter:card" content={metadata.twitter.card} />
<meta name="twitter:title" content={metadata.twitter.title} />
<meta name="twitter:description" content={metadata.twitter.description} />
<meta name="twitter:image" content={metadata.twitter.image} />
<meta name="twitter:site" content={metadata.twitter.site} />
<meta name="twitter:creator" content={metadata.twitter.creator} />
<meta name="apple-mobile-web-app-capable" content="yes" />
<meta name="apple-mobile-web-app-status-bar-style" content="black-translucent" />
</Head>
<body>
<Navbar />
<div style={{ paddingTop: '5rem' }}>{/* To account for the fixed navbar height */}</div>
{children}
<Footer />
</body>
</html>
);
}

2 changes: 1 addition & 1 deletion lib/getRogueApps.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@ export function getRogueApps() {
const jsonData = fs.readFileSync(filePath, 'utf8');
const rogueApps = JSON.parse(jsonData);
return rogueApps;
}
}
1 change: 0 additions & 1 deletion next-env.d.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
/// <reference types="next" />
/// <reference types="next/image-types/global" />
/// <reference types="next/navigation-types/compat/navigation" />

// NOTE: This file should not be edited
// see https://nextjs.org/docs/basic-features/typescript for more information.
12 changes: 6 additions & 6 deletions next.config.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
/** @type {import('next').NextConfig} */
const nextConfig = {
basePath: "/rogueapps",
output: "export", // <=== enables static exports
reactStrictMode: true,
};
module.exports = nextConfig;
basePath: process.env.NODE_ENV === 'production' ? '/rogueapps' : '',
output: 'export', // Enables static exports
reactStrictMode: true,
};

module.exports = nextConfig;
4 changes: 1 addition & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,7 @@
"private": true,
"scripts": {
"dev": "next dev",
"build": "next build",
"deploy": "next build && gh-pages -d out"
"build": "next build"
},
"dependencies": {
"next": "14.2.5",
Expand All @@ -18,7 +17,6 @@
"@types/react-dom": "^18",
"eslint": "^8",
"eslint-config-next": "14.2.5",
"gh-pages": "^6.1.1",
"typescript": "^5"
}
}
20 changes: 0 additions & 20 deletions pages/_document.tsx

This file was deleted.

16 changes: 0 additions & 16 deletions pages/api/rogueapps.ts

This file was deleted.

File renamed without changes.
File renamed without changes.

0 comments on commit 4306aa0

Please sign in to comment.